Allows registering an action delegate that will be called when the scope ends,
but before the scope disposes any instances.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- container
- Type: SimpleInjectorContainer
The Container instance. - action
- Type: SystemAction
The delegate to run when the scope ends.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when one of the arguments is a null reference. |
InvalidOperationException | Will be thrown when there is currently no active scope for the supplied container. |
Remarks
See Also