【发布时间】:2014-07-01 07:03:38
【问题描述】:
我正在尝试将异常拦截器与注入工厂一起使用,如下所示:
container.RegisterType<IProcessorService>(
new HierarchicalLifetimeManager(),
new InjectionFactory(c => processorFactory.CreateChannel()),
new Interceptor<InterfaceInterceptor>(),
new InterceptionBehavior<AppExceptionInterceptor>());
唯一的问题是拦截器不工作。注入工厂有效,但拦截器无效。对于其他类型,当我在不使用注入工厂的情况下执行拦截器时,一切都很好。
有什么想法吗?
为任何智慧干杯!!
【问题讨论】:
标签: c# inversion-of-control unity-container aop ioc-container