-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyword arguments in reflection-based Caller/Callee #132
Comments
Hi Michael,
It is not possible for callers. For callees this is done automatically by
mapping keyword arguments to the arguments with the same names. Note that
positional parameters have higher priority than keyword arguments - i.e. a
keyword argument with the requested name is looked up only if the argument
position (of the method) is larger than the number of arguments received in
arguments array.
Elad
|
Hi Elad,
In my case, actually, there's a fixed set of keyword arguments (basically, some user identification) which I need to pass to all method calls. In order to avoid using the raw caller approach for all of these methods, I'm afraid I will have to implement a reflection-based caller mechanism based on a custom ProxyGenerator? For the callee part: If I get it right, this means that e.g.
could be called with positional args Michael |
Hi, I prefer having an attribute indicating whether the whole arguments are Regarding callees: If you have a method [WampProcedure("com.example.keywordsexample")] Then the arguments resolve is done in this order:
For example if you get args = [1,2,"Hello"], kwArgs = { "user": "Bill" }, If you get args = [1], kwArgs = { "arg2": 2, user: "Bill" }, then the |
Hi Elad, |
Hi Elad, I am implementing the caller side for an application and all the arguments are passed as keyword arguments. So it would make my life easier :) Thank you very much. |
Hi @Chunky-Monkey, |
Hi,
is it possible to use keyword arguments (see WAMP specs with the simple, reflection-based API? It seems to be possible using the raw API, but that is rather cumbersome when implementing a lot of services.
Thanks,
Michael
The text was updated successfully, but these errors were encountered: