Registers a FuncTResult delegate that allows creation of instances of the type
expressed by the UnregisteredServiceType for this and future requests. The delegate
will be caches and future requests will directly call that delegate.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- instanceCreator
- Type: SystemFuncObject
The delegate that allows creation of instances of the type expressed by the UnregisteredServiceType.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the instanceCreator is a null reference. |
ActivationException | Thrown when multiple observers that have registered to the ResolveUnregisteredType event called this method for the same type. |
See Also