- changed status to open
General call commands
Two general commands, call-static
and call-instance
that can be used to call any loaded C# method
Proposed signatures
call-static className funcName args
call-instance className funcName monoTargetType args
Current Problems
Currently they will throw an ambiguous method error when there are 2 overloads of the same function. A better way to address this needs to be determined
Potential Solutions
Different solutions to help solve the ambiguous overload use case. Some of these may be combined together.
- Do nothing - throw a clear error with all of the ambiguous overloads
-
Use the supplied
args
count, pick the overload with the matching arg count- If two overloads have the same number of args, fail
-
Same as 2, but
- If there are two overloads with the same number of args, but with different number of default args, potentially resort to that that uses the least number of default args, but fail
- else, fail
-
Additional overload
call-static className funcName types args
types
is a type array specifying the type of each argument. Much more verbose than the normal variant, but has zero ambiguity (and hence would only be used in the case that the original command fails)
Comments (4)
-
reporter -
reporter Prototypes for both
call-static
andcall-instance
are complete; neither handle the overload problem -
reporter - edited description
-
reporter - changed status to resolved
Finished, will not make it into V2.3.3
Uses proposals 2 and 4
- Log in to comment