2014-07-01 57 views
0

我試圖用這樣一個injectionfactory一起使用異常攔截器:團結InjectionFactory和攔截

container.RegisterType<IProcessorService>(
    new HierarchicalLifetimeManager(), 
    new InjectionFactory(c => processorFactory.CreateChannel()), 
    new Interceptor<InterfaceInterceptor>(), 
    new InterceptionBehavior<AppExceptionInterceptor>()); 

唯一的問題是攔截器不工作。注射工廠工作,但不是攔截器。對於其他類型的情況,當我使用攔截器而不使用注射工廠時,一切都很好,並且工作正常。

任何想法?

爲任何智慧而歡呼!

回答

1

忘記將截取擴展添加到容器!

container.AddNewExtension<Interception>();