Registers an Expression that describes the creation of instances of the type
expressed by the UnregisteredServiceType for this and future requests. The delegate
will be cached and future requests will directly use that expression or the compiled delegate.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- expression
- Type: System.Linq.ExpressionsExpression
The expression that describes the creation of instances of the type expressed by the UnregisteredServiceType.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the expression is a null reference. |
ActivationException | Thrown when multiple observers that have registered to the ResolveUnregisteredType event called this method for the same type. |
Remarks
See Also