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
Syntaxpublic ContainerBuilder RegisterBuildCallback(
Action<ILifetimeScope> buildCallback
)
Public Function RegisterBuildCallback (
buildCallback As Action(Of ILifetimeScope)
) As ContainerBuilder
Parameters
- buildCallback
- Type: SystemActionILifetimeScope
Callback to execute.
Return Value
Type:
ContainerBuilderThe
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