-
Notifications
You must be signed in to change notification settings - Fork 7
Event aspects
Sagi edited this page Aug 10, 2015
·
4 revisions
An Aspect that, when applied on an event, intercepts invocations of its Add, Remove and the actual invocation.
In order to apply an aspect an event the first thing you need to do is write the aspect itself.
You need to create a class that derives from one of these types:
NCop differentiates between functions and subroutines the same way as the .NET delegates (System.Func<T>, System.Action
).
If you want to create an event aspect for a subroutine (method that returns void in C# or Sub in VB) you will need to derive from EventActionInterceptionAspect
and to derive from EventFunctionInterceptionAspect
for a function event.