Specify LifetimeManager class

Sep 13, 2011 at 6:52 AM
Edited Sep 13, 2011 at 6:55 AM

How can I specify  a custom lifetime manager class along with Auto registration? I want to register open generic types using auto registration and would like to specify a custom lifetime manager class.

Coordinator
Sep 13, 2011 at 9:23 AM
Edited Sep 13, 2011 at 9:25 AM
container
    .ConfigureAutoRegistration()
    .Include(type => type.ImplementsOpenGeneric(typeof(IHandlerFor<>)), 
        Then.Register().UsingLifetime<CustomLifetimeManager>())
    .ApplyAutoRegistration();