Specifies when and how a service will be instantiated.
Namespace: DigitalRune.ServiceLocationAssembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.0.0.0 (1.0.0.9503)
Syntax
| C# |
|---|
public enum CreationPolicy |
| Visual Basic |
|---|
Public Enumeration CreationPolicy |
| Visual C++ |
|---|
public enum class CreationPolicy |
Members
| Member name | Value | Description | |
|---|---|---|---|
| Shared | 0 | Specifies that a single shared instance of the associated service will be created by the ServiceContainer and shared by all requests. The service instance is also reused by all child containers. | |
| LocalShared | 1 | Specifies that a single instance of the associated service will be created by the ServiceContainer and shared locally (per container) by all requests. The service instance is created per container and is not reused by child containers. | |
| NonShared | 2 | Specifies that a new non-shared instance of the associated service will be created by the ServiceContainer for every request. |