我一直在玩弄統一做一些AOP的東西,通過國際奧委會一樣設置:團結IOC,AOP及接口攔截
ioc.RegisterType<ICustomerService, CustomerService>()
.Configure<Interception>().SetInterceptorFor<ICustomerService>(new InterfaceInterceptor());
...然後有對ICustomerService接口的方法的ICallHandler 。暫時我想要調用的方法,它所在的類以及該類的命名空間。所以......裏面......
public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
...的ICallHandler的方法,我可以通過input.MethodBase.Name訪問方法的名稱...如果我使用input.MethodBase.DeclaringType.Name我獲取接口ICustomerService ...但...我將如何去實現類「CustomerService」而不是接口?
我被告知要使用input.Target ..但剛剛返回「DynamicModule.ns.Wrapped_ICustomerService_4f2242e5e00640ab84e4bc9e05ba0a13」
這個人任何幫助嗎?