An instance of this type will be supplied to the PredicateT
delegate that is that is supplied to the
RegisterConditional
overload that takes this delegate. This type contains information about the service that
is about to be created and it allows the user to examine the given instance to decide whether this
implementation should be created or not.
Inheritance Hierarchy
SimpleInjector.AdvancedApiObject
SimpleInjectorPredicateContext
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
The PredicateContext type exposes the following members.
Properties
Name | Description | |
---|---|---|
Consumer |
Gets the contextual information of the consuming component that directly depends on the registered
service. This property will never return null, but instead throw an exception when the service is
requested directly from the container.
| |
Handled | Gets a value indicating whether a previous Register registration has already
been applied for the given ServiceType. | |
HasConsumer |
Gets a value indicating whether the resolved service is injected into a consumer or is requested
directly from the container.
| |
ImplementationType |
Gets the closed generic implementation type that will be created by the container.
| |
ServiceType | Gets the closed generic service type that is to be created. |
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from ApiObject.) | |
GetHashCode | Serves as the default hash function. (Inherited from ApiObject.) | |
GetType | Gets the Type of the current instance. (Inherited from ApiObject.) | |
ToString | Returns a string that represents the current object. (Inherited from ApiObject.) |
Remarks
See Also