Specifies when a service instance will be disposed.
Namespace: DigitalRune.ServiceLocationAssembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.0.0.0 (1.0.0.9503)
Syntax
| C# |
|---|
public enum DisposalPolicy |
| Visual Basic |
|---|
Public Enumeration DisposalPolicy |
| Visual C++ |
|---|
public enum class DisposalPolicy |
Members
| Member name | Value | Description | |
|---|---|---|---|
| Automatic | 0 | Specifies that the service instance will automatically be disposed when the ServiceContainer is disposed. (The service's lifetime is bound to the lifetime of the container.) | |
| Manual | 1 | Specifies that the service instance is not automatically diposed when the ServiceContainer is disposed. (The service is owned by an external object, which is responsible for disposing the instance.) |
Remarks
The DisposalPolicy is only relevant for services that implement
IDisposable.