PostSharp Laos allows you to implement the following kind of aspects:
On Method
Boundary
You override the methods OnEntry,
OnSuccess, OnException and
OnExit. At runtime, you receive the array of
parameters and additionally, on exit, the return value or the
exception. This is useful to implement tracing or transaction
handling, for instance.
On Exception
You override the method OnException. At runtime, you
receive the array of parameters and the exception currently flying.
This works even for methods defined outside the current assembly.
So you can implement easily exception handling policies.
On Field Access
You override the methods OnGetValue and
SetValue. So you can intercept all access to
fields.
On Method
Invocation
You override the method OnInvocation. At
runtime, you receive a delegate to the method that should actually
be called and the array of arguments. This is useful when you want
to intercept calls to methods that are not defined in the current
assembly, for instance to monitor calls to
System.Threading.
Composition
This aspect allows to implement an interface in a type by
composition, i.e. the interface implementation is 'delegated' to
another type.
Implement
Method
This aspect allows to implement abstract or
extern method: you override the method
OnExecution. At runtime, you receive the array of
arguments.