IDependencyInjectionBehaviorGetInstanceProducer Method

Simple Injector
Gets the InstanceProducer for the Target of the supplied consumer.

Namespace:  SimpleInjector.Advanced
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.0.0
Syntax

InstanceProducer GetInstanceProducer(
	InjectionConsumerInfo consumer,
	bool throwOnFailure
)

Parameters

consumer
Type: SimpleInjectorInjectionConsumerInfo
Contextual information about the consumer where the built dependency is injected into.
throwOnFailure
Type: SystemBoolean
The indication whether the method should return null or throw an exception when the type is not registered.

Return Value

Type: InstanceProducer
An InstanceProducer that describes the intend of creating that Target. This method never returns null.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when the argument is a null reference.
See Also

Reference