OwinContextExtensionsGetAutofacLifetimeScope Method |
Gets the current Autofac lifetime scope from the OWIN context.
Namespace:
Autofac.Integration.Owin
Assembly:
Autofac.Integration.Owin (in Autofac.Integration.Owin.dll) Version: 6.0.0
Syntax public static ILifetimeScope GetAutofacLifetimeScope(
this IOwinContext context
)
<ExtensionAttribute>
Public Shared Function GetAutofacLifetimeScope (
context As IOwinContext
) As ILifetimeScope
Parameters
- context
- Type: IOwinContext
The OWIN context.
Return Value
Type:
ILifetimeScopeThe current lifetime scope.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IOwinContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions See Also