Click or drag to resize

MultitenantContainerReconfigureTenant Method

Allows re-configuration of tenant-specific components by closing and rebuilding the tenant scope.

Namespace:  Autofac.Multitenant
Assembly:  Autofac.Multitenant (in Autofac.Multitenant.dll) Version: 6.0.0+9a36082eb9b91dac82616d9efefa940b8c375948
Syntax
public bool ReconfigureTenant(
	Object tenantId,
	Action<ContainerBuilder> configuration
)

Parameters

tenantId
Type: SystemObject
The ID of the tenant for which configuration is occurring. If this value is , configuration occurs for the "default tenant" - the tenant that is used when no tenant ID can be determined.
configuration
Type: SystemActionContainerBuilder
An action that uses a ContainerBuilder to set up registrations for the tenant.

Return Value

Type: Boolean
true if an existing configuration was removed; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if configuration is .
Remarks

If you need to configure a tenant across multiple registration calls, consider using a ConfigurationActionBuilder and configuring the tenant using the aggregate configuration action it produces.

This method is intended for use after application start-up. During start-up, please use ConfigureTenant(Object, ActionContainerBuilder).

See Also