Returns the current Scope for this lifestyle and the given container, or null when this method is executed outside the context of a scope.
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 4.10.2
public Scope GetCurrentScope( Container container )
Public Function GetCurrentScope ( container As Container ) As Scope
- Type: SimpleInjectorContainer
The container instance that is related to the scope to return.
Return ValueType: Scope
A Scope instance or null when there is no scope active in this context.