which of the following syntax is considered best practice?
For<IMyInterface>().LifecycleIs(new HybridLifecycle()).Use<MyImplementation>();
For<IMyInterface>().LifecycleIs(Lifecycles.GetLifecycle(InstanceScope.Hybrid)).Use<MyImplementation>();
if the first one is corre开发者_如何学Goct, can I create one object HybridLifecycle, and use it for multiple For<...> statements, or is it necessary for each For<> to create a new HybridLifecycle?
Using the configuration helpers is probably the best practice.
For<IMyInterface>().HybridHttpOrThreadLocalScoped().Use<MyImplementation>()
精彩评论