How can I write Interceptor (AOP) with Castle Core or Other libraries (just free libraries) for Cross Cutting Concerns
问题 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 回答1: Autofac is a free IoC