Click or drag to resize

OwinContextExtensionsSetAutofacLifetimeScope Method

Sets the current Autofac lifetime scope to the OWIN context.

Namespace:  Autofac.Integration.Owin
Assembly:  Autofac.Integration.Owin (in Autofac.Integration.Owin.dll) Version: 6.0.0
Syntax
public static void SetAutofacLifetimeScope(
	this IOwinContext context,
	ILifetimeScope scope
)

Parameters

context
Type: IOwinContext
The OWIN context.
scope
Type: AutofacILifetimeScope
The 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
ExceptionCondition
ArgumentNullException Thrown if context or scope is .
Remarks
The caller is responsible for the appropriate disposal of the passed ILifetimeScope.
See Also