UnregisteredTypeEventArgsRegister Method (FuncObject)

Simple Injector
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: 4.0.0
Syntax

public void Register(
	Func<Object> instanceCreator
)

Parameters

instanceCreator
Type: SystemFuncObject
The delegate that allows creation of instances of the type expressed by the UnregisteredServiceType.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when the instanceCreator is a null reference.
ActivationExceptionThrown when multiple observers that have registered to the ResolveUnregisteredType event called this method for the same type.
See Also

Reference