After all registrations, I am doing ContainerBuilder.RegisterCallback
and subscribing to all IComponentRegistration.Preparing
and IComponentRegistration.Activating
events to be able to handle all activations. With this two events I am able to build a tree, the order of events looks like this:
- Preparing: Root
- Preparing: FirstLevel_A
- Activating: FirstLevel_A
- Preparing: FirstLevel_B
- Preparing: SecondLevel_C
- Activating: SecondLevel_C
- Activating: FirstLevel_B
- Activating: Root
But what if some registrations are not Per Dependency
and I will have a graph instead of a tree. Is it possible to handle this case?