Click or drag to resize

ContainerProviderContainerBeginLifetimeScope Method (ActionContainerBuilder)

Begin a new nested scope, with additional components available to it. Component instances created via the new scope will be disposed along with it.

Namespace:  Autofac.Integration.Web
Assembly:  Autofac.Integration.Web (in Autofac.Integration.Web.dll) Version: 6.0.0+0b24e3a20aaeba340141e7205a9b7643b9d6cc54
Syntax
public ILifetimeScope BeginLifetimeScope(
	Action<ContainerBuilder> configurationAction
)

Parameters

configurationAction
Type: SystemActionContainerBuilder
Action on a ContainerBuilder that adds component registations visible only in the new scope.

Return Value

Type: ILifetimeScope
A new lifetime scope.

Implements

ILifetimeScopeBeginLifetimeScope(ActionContainerBuilder)
Remarks
The components registered in the sub-scope will be treated as though they were registered in the root scope, i.e., SingleInstance() components will live as long as the root scope.
See Also