Verifies whether the dependency can be injected into the given consumer by the container,
based on the supplied type information of both the consumer and the dependency.
Namespace: SimpleInjector.Advanced
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- dependency
- Type: SimpleInjectorInjectionConsumerInfo
Contextual information about the dependency. - errorMessage
- Type: SystemString
The description of why the dependency is invalid, when the method returns false.
Return Value
Type: BooleanTrue when the dependency is valid, otherwise false and the errorMessage is set with an explanation.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the supplied argument is a null reference. |
See Also