Creates a new InstanceProducer instance for the given serviceType
that will create new instances of specified implementationType with the
caching as specified by this lifestyle.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
public InstanceProducer CreateProducer( Type serviceType, Type implementationType, Container container )
Parameters
- serviceType
- Type: SystemType
The interface or base type that can be used to retrieve the instances. - implementationType
- Type: SystemType
The concrete type that will be registered. - container
- Type: SimpleInjectorContainer
The Container instance for which a Registration must be created.
Return Value
Type: InstanceProducerA new InstanceProducer instance.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when on of the supplied arguments is a null reference. |
See Also