Metalama
Metalama copied to clipboard
Invokers targeting event raise from event raise template
A follow-up of #549. The current public API probably cannot express the difference between calling a handler received by Raise template Vs. invoking another event.
There are the following things the user can do:
- Call the handler from the template using
meta.Proceed. This preserves all parameters (and their order) received by the template. - Call the handler with different parameters. This would naturally require invoker-like syntax.
- Call an invoker of the same event with specified options.
The last point poses a problem - it's easy to introduce an infinite cycle or to call the underlying event multiple times since the template represents "invocation of a single delegate".
Therefore, using invokers within this kind of template (or aux templates called) should be limited to Default invoker options. Otherwise, an error should be produced.
The current behavior ignores the order, and the invoker always targets the handler.