The current Orleans interceptor API provides methods for getting and setting interceptors:
InvokeInterceptor GetInvokeInterceptor();
void SetInvokeInterceptor(InvokeInterceptor interceptor);
The problem is that a second call to SetInvokeInterceptor will overwrite the original interceptor. This means that two bootstrap providing could be competing for a single interceptor, unless the developer observes any previously set interceptor.
I propose adding a new method to add an interceptor to an internally maintained stack. The runtime code will then run each of the interceptors in the stack in turn.
This would allow easier registration of multiple interceptors.
The current Orleans interceptor API provides methods for getting and setting interceptors:
The problem is that a second call to
SetInvokeInterceptorwill overwrite the original interceptor. This means that two bootstrap providing could be competing for a single interceptor, unless the developer observes any previously set interceptor.I propose adding a new method to add an interceptor to an internally maintained stack. The runtime code will then run each of the interceptors in the stack in turn.
This would allow easier registration of multiple interceptors.