Click or drag to resize

RegistrationExtensionsInstancePerTenantTLimit, TActivatorData, TRegistrationStyle Method

Share one instance of the component within the context of an individual tenant.

Namespace:  Autofac.Multitenant
Assembly:  Autofac.Multitenant (in Autofac.Multitenant.dll) Version: 6.0.0+9a36082eb9b91dac82616d9efefa940b8c375948
Syntax
public static IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> InstancePerTenant<TLimit, TActivatorData, TRegistrationStyle>(
	this IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> registration
)

Parameters

registration
Type: Autofac.BuilderIRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle
Registration to set the lifetime scope on.

Type Parameters

TLimit
Registration limit type.
TActivatorData
Activator data type.
TRegistrationStyle
Registration style type.

Return Value

Type: IRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle

[Missing <returns> documentation for "M:Autofac.Multitenant.RegistrationExtensions.InstancePerTenant``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle. 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 registration is .
Remarks

This method is useful when there is a desire to register an individual component at the root container level and have one instance of the component created per tenant.

See Also