Registers that a new instance of concreteType will be returned every time it
is requested (transient).
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- concreteType
- Type: SystemType
The concrete type that will be registered. This can be an open-generic type.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when concreteType is a null references. |
ArgumentException | Thrown when concreteType represents a type that can not be created by the container. |
InvalidOperationException | Thrown when this container instance is locked and can not be altered, or when an the concreteType has already been registered. |
Remarks
See Also