Assembly: SimpleInjector (in SimpleInjector.dll) Version: 4.6.0
public InstanceProducer GetRootRegistrations()
Public Function GetRootRegistrations As InstanceProducer()
Return ValueType: InstanceProducer
An array of InstanceProducer instances.
|InvalidOperationException||Thrown when this method is called before Verify has been successfully called.|
This method has a performance characteristic of O(n). Prevent from calling this in a performance critical path of the application.
This list contains the root objects of all explicitly registered types, and all implicitly registered instances. Implicit registrations are all concrete unregistered types that have been requested, all types that have been resolved using unregistered type resolution (using the ResolveUnregisteredType event), and requested unregistered collections. Note that the result of this method may change over time, because of these implicit registrations.
Note: This method is not guaranteed to always return the same InstanceProducer instance for a given registration. It will however either always return a producer that is able to return the expected instance. Because of this, do not compare sets of instances returned by different calls to GetCurrentRegistrations by reference. The way of comparing lists is by the actual type. The type of each instance is guaranteed to be unique in the returned list.