Click or drag to resize

MultitenantContainerBeginLifetimeScope Method (Object, ActionContainerBuilder)

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

Namespace:  Autofac.Multitenant
Assembly:  Autofac.Multitenant (in Autofac.Multitenant.dll) Version: 6.0.0+9a36082eb9b91dac82616d9efefa940b8c375948
Syntax
public ILifetimeScope BeginLifetimeScope(
	Object tag,
	Action<ContainerBuilder> configurationAction
)

Parameters

tag
Type: SystemObject
The tag applied to the ILifetimeScope.
configurationAction
Type: SystemActionContainerBuilder
Action on a ContainerBuilder that adds component registrations visible only in the new scope.

Return Value

Type: ILifetimeScope
A new lifetime scope.

Implements

ILifetimeScopeBeginLifetimeScope(Object, 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