The SimpleInjector.Lifestyles namespace contains types for implementing custom lifestyles.
Classes
Class | Description | |
---|---|---|
AsyncScopedLifestyle |
Defines a lifestyle that caches instances during the lifetime of an explicitly defined scope using the
BeginScope
method. An execution context scope flows with the logical execution context. Scopes can be nested and
nested scopes will get their own instance. Instances created by this lifestyle can be disposed when
the created scope gets disposed.
| |
SingletonLifestyle |
The singleton lifestyle.
| |
ThreadScopedLifestyle |
Defines a lifestyle that caches instances during the lifetime of an explicitly defined scope using the
BeginScope
method. A scope is thread-specific, each thread should define its own scope. Scopes can be nested and
nested scopes will get their own instance. Instances created by this lifestyle can be disposed when
the created scope gets disposed.
|