开发者

Intercepting singleton instances

I'm receiving "Potential Lifestyle Mismatches"

Component 'MyCompon开发者_运维技巧ent' with lifestyle Singleton depends on 'Castle.TypedFactory.Interceptor' with lifestyle Transient

Is there any issue using an Interceptor against multiples singletone instances?

,Component.For<ApiInterceptor>()

, AllTypes.FromAssemblyContaining<MyServiceContract>()
    .Where(Component.IsInSameNamespaceAs<MyServiceContract>())
    .Configure(c => c.Interceptors(typeof(ApiInterceptor)))
    .Configure(c => c.LifeStyle.Singleton)


It's probably fine. There's a reason why this diagnostics is called potential lifestyle mismatches.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜