Closed hzy-6 closed 7 months ago
Sorry, I cannot accept this PR:
object
type we can pass all arguments as an array - this is not support of "params" at allLambdaParameterWrapper.InvokeDelegate
should be implemented in the same way as in LambdaParameterWrapper.InvokeMethod
: invocation is delegated to IInvokeMethod implementation, which checks for ParamArrayAttribute
of the last delegate argument and handles this accordingly.Is this okay?
It may be better to leave the InvokeDelegate function to developers for implementation
@hzy-6 an approach in overall is correct (first screenshot), however implementation in OptionsParamInvokeMethod is definitely wrong - take a look how correct handling of "params" is implemented in OptionsParamInvokeMethod.Invoke
method; also, I guess some refactoring is needed to avoid copy paste between these 2 methods.
If you don't know how to implement this, you can use your own implementation which works for you for now (your forked version), and then switch to upstream when it will be implemented.
https://github.com/nreco/lambdaparser/issues/3#issuecomment-1912173889
sum(1,2,3,4 ... )