You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2026. It is now read-only.
Ian Johnson edited this page Sep 7, 2018
·
2 revisions
Filters
EasyRpc provides the ability to apply filters to your rpc calls by implementing one or both of the interfaces ICallExecuteFilter and ICallExceptionFilter.
app.UseJsonRpc("", api =>{api.ApplyFilter<CustomFilter>();api.Expose<IntMathService>();});publicclassCustomFilter:ICallExecuteFilter,ICallExceptionFilter{publicvoidAfterExecute(ICallExecutionContextcontext){}publicvoidBeforeExecute(ICallExecutionContextcontext){}publicvoidHandleException(ICallExecutionContextcontext,Exceptionexception){}}
Attributes
Sometimes it's easier to apply filters using attributes. They can be applied at the method, class, or assembly level.