| DisposalPolicy Enumeration |
Specifies when a service instance will be disposed.
Namespace: DigitalRune.ServiceLocationAssembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.13596)
Syntax public enum DisposalPolicy
Public Enumeration DisposalPolicy
public enum class DisposalPolicy
Members
| Member name | Value | Description |
---|
| Automatic | 0 |
Specifies that the service instance will automatically be disposed when the service is
removed from the ServiceContainer or 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 disposed 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.
See Also