Skip to content

Commit 69a16ed

Browse files
simplify TypesOfValue
1 parent 70fe80e commit 69a16ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Code/MethodSystem/Methods/UCRMethods/UCRRoleInfoMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public class UCRRoleInfoMethod : LiteralValueReturningMethod, IReferenceResolvin
2424

2525
public override string Description => "Returns information about a custom role.";
2626

27-
public override TypeOfValue LiteralReturnTypes => new TypesOfValue([
27+
public override TypeOfValue LiteralReturnTypes => new TypesOfValue(
2828
typeof(NumberValue),
2929
typeof(TextValue)
30-
]);
30+
);
3131

3232
public override Argument[] ExpectedArguments =>
3333
[

Code/ValueSystem/TypeOfValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ protected TypeOfValue(Type? required)
2222

2323
public class TypesOfValue : TypeOfValue
2424
{
25-
public TypesOfValue(SingleTypeOfValue[] types) : base(types.Select(t => t.Type).ToArray())
25+
public TypesOfValue(params SingleTypeOfValue[] types) : base(types.Select(t => t.Type).ToArray())
2626
{
2727
_types = types.Select(t => t.Type).ToArray();
2828
}
2929

30-
public TypesOfValue(Type[] types) : base(types)
30+
public TypesOfValue(params Type[] types) : base(types)
3131
{
3232
_types = types;
3333
}

0 commit comments

Comments
 (0)