I want to have an attribute like this for Cross Cutting Concerns like Logging , Exception , ...
public class MyService
{
[Log] // Interception (AOP)
[ExceptionHandler] // Interception (AOP)
public void DoSomething()
{
}
}
I know that I can write these codes with postsharp but I want to write these interceptions with free libraries like Castle Core and ...
Can anyone help me and write a sample for these purpose ??? I need a very simple sample for learning concepts
This lib does what you need https://github.com/pamidur/aspect-injector
ps. shameless self-ad