DynamicExpresso icon indicating copy to clipboard operation
DynamicExpresso copied to clipboard

seems it can't support "ref" or "out" keywords in method parse

Open zhaosih opened this issue 9 years ago • 4 comments

could you make it support?

zhaosih avatar Apr 27 '15 07:04 zhaosih

You are right, ref and out keywords are not supported. Probably can be implemented but I think that are very few cases where it is useful.

Can you just explain how do you plan to use this feature? Maybe there is a better alternative...

davide

davideicardi avatar Apr 27 '15 07:04 davideicardi

Pleasantly surprised by your quick response. Your project is really great, It's much easier than normal reflection method .I just want to invoke some existing library like PHP did. In PHP I can use PHP: call_user_func(["obj","method"],[$arg1,$arg2...]). I found this project is quite match my requirement. But some methods would have "ref" or "out" parameters. I don't know how to deal with it.

zhaosih avatar Apr 27 '15 08:04 zhaosih

Ok, I understand. Probably that can be implemented but only when using delegates, ie. when calling a real .NET function. I will add it as an "enhancement" for the future.

For now you can pass a complex object and modify a property on this object. For example writing an expression like: yourComplexObject.YourProperty = xyz

davide

davideicardi avatar Apr 27 '15 09:04 davideicardi

Really good solution! Simple but work.

Great thanks!

zhaosih avatar Apr 27 '15 10:04 zhaosih