Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace mylibrary
- {
- public class MyFilterAttribute : TypeFilterAttribute
- {
- public MyFilterAttribute() : base(typeof(MyFilterImpl)) { }
- }
- internal class MyFilterImpl: ExceptionFilterAttribute
- {
- private MyClass _dependency;
- public MyFilterImpl(MyClass dependency)
- {
- _dependency = dependency;
- }
- public override async Task OnExceptionAsync(ExceptionContext context)
- {
- // do your stuff
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement