Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.0.0
public event EventHandler<ContainerLockingEventArgs> ContainerLocking
Public Event ContainerLocking As EventHandler(Of ContainerLockingEventArgs)
The ContainerLocking event is called exactly once by the container, allowing a developer to register types, hook unregistered type resolution events that need to be applied last, or see who is responsible for locking the container.
A registered event handler delegate is allowed to make a call that locks the container, e.g. calling Container.GetInstance; this will not cause any new ContainerLocking event to be raised. Doing so, however, is not advised, as that might cause any following executed handlers to break, in case they require an unlocked container.