Click or drag to resize

ContainerBuilderRegisterBuildCallback Method

Register a callback that will be invoked when the container (or lifetime scope) is built.

Namespace:  Autofac
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax
public ContainerBuilder RegisterBuildCallback(
	Action<ILifetimeScope> buildCallback
)

Parameters

buildCallback
Type: SystemActionILifetimeScope
Callback to execute.

Return Value

Type: ContainerBuilder
The ContainerBuilder instance to continue registration calls.
Remarks
The argument to the registered build callback will be an instance of the derived IContainer if this builder is being used to build a fresh container, or an ILifetimeScope if it's being used to create custom registrations for a new lifetime scope.
See Also