I am trying to use StructureMap 2.6.1 to register all of my repositories at once using convention-based registration. See below code:
x.Scan(s =>
{
s.TheCallingAssembly();
s.IncludeNamespaceContainingType<RepositoryRegistration>();
s.SingleImplementationsOfInterface();
}
This works, but now I'm trying to add a lifecycle (HybridHttpOrThreadLocalScope) to all registered types. Is this possible without rewriting the SingleImplementationsOfInterface convention from scratch, and if so, how?
Thank.
source
share