IDependencyInjectionBehaviorGetInstanceProducer Method

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

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

InstanceProducer GetInstanceProducer(
	InjectionConsumerInfo dependency,
	bool throwOnFailure
)

Parameters

dependency
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