The Lifestyle type exposes the following members.
Methods
Name | Description | |
---|---|---|
CreateCustom |
Creates a custom lifestyle using the supplied lifestyleApplierFactory delegate.
| |
CreateHybrid(ScopedLifestyle, Lifestyle) |
The hybrid lifestyle allows mixing two lifestyles in a single registration. The hybrid will use
the defaultLifestyle in case its
GetCurrentScope method returns a
scope; otherwise the fallbackLifestyle is used. The hybrid lifestyle will
redirect the creation of the instance to the selected lifestyle. By nesting hybrid lifestyles,
any number of lifestyles can be mixed.
| |
CreateHybrid(ScopedLifestyle, ScopedLifestyle) |
The hybrid lifestyle allows mixing two lifestyles in a single registration. The hybrid will use
the defaultLifestyle in case its
GetCurrentScope method returns a
scope; otherwise the fallbackLifestyle is used. The hybrid lifestyle will
redirect the creation of the instance to the selected lifestyle. By nesting hybrid lifestyles,
any number of lifestyles can be mixed.
| |
CreateHybrid(FuncBoolean, Lifestyle, Lifestyle) |
The hybrid lifestyle allows mixing two lifestyles in a single registration. Based on the supplied
lifestyleSelector delegate the hybrid lifestyle will redirect the creation of
the instance to the correct lifestyle. The result of the lifestyleSelector
delegate will not be cached; it is invoked each time an instance is requested or injected. By
nesting hybrid lifestyles, any number of lifestyles can be mixed.
| |
CreateHybrid(FuncBoolean, ScopedLifestyle, ScopedLifestyle) |
The hybrid lifestyle allows mixing two lifestyles in a single registration. Based on the supplied
lifestyleSelector delegate the hybrid lifestyle will redirect the creation of
the instance to the correct lifestyle. The result of the lifestyleSelector
delegate will not be cached; it is invoked each time an instance is requested or injected. By
nesting hybrid lifestyles, any number of lifestyles can be mixed.
| |
CreateProducer(Type, Type, Container) |
Creates a new InstanceProducer instance for the given serviceType
that will create new instances of specified implementationType with the
caching as specified by this lifestyle.
| |
CreateProducerTService(FuncTService, Container) |
Creates a new InstanceProducer instance for the given TService
that will create new instances instance using the supplied instanceCreator
with the caching as specified by this lifestyle.
| |
CreateProducerTService(Type, Container) |
Creates a new InstanceProducer instance for the given TService
that will create new instances of specified implementationType caching as
specified by this lifestyle.
| |
CreateProducerTService, TImplementation(Container) |
Creates a new InstanceProducer instance for the given TService
that will create new instances of specified TImplementation with the
caching as specified by this lifestyle.
| |
CreateRegistration(Type, Container) |
Creates a new Registration instance defining the creation of the
specified concreteType with the caching as specified by this lifestyle,
or returns an already created Registration instance for this container + lifestyle
+ type combination.
This method might fail when run in a partial trust sandbox when concreteType
is an internal type.
| |
CreateRegistration(Type, FuncObject, Container) |
Creates a new Registration instance defining the creation of the
specified serviceType using the supplied instanceCreator
with the caching as specified by this lifestyle.
| |
CreateRegistrationTConcrete(Container) |
Creates a new Registration instance defining the creation of the
specified TConcrete with the caching as specified by this lifestyle,
or returns an already created Registration instance for this container + lifestyle
+ type combination.
| |
CreateRegistrationTService(FuncTService, Container) |
Creates a new Registration instance defining the creation of the
specified TService using the supplied instanceCreator
with the caching as specified by this lifestyle.
| |
CreateRegistrationCore(Type, Container) |
When overridden in a derived class,
creates a new Registration instance defining the creation of the
specified concreteType with the caching as specified by this lifestyle.
| |
CreateRegistrationCoreTService(FuncTService, Container) |
When overridden in a derived class,
creates a new Registration instance defining the creation of the
specified TService using the supplied instanceCreator
with the caching as specified by this lifestyle.
|
See Also