PredicateContext Class

Simple Injector
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 open generic 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


Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.9.1

public sealed class PredicateContext : ApiObject

The PredicateContext type exposes the following members.


Public propertyConsumer
Gets the contextual information of the consuming component that directly depends on the resolved service. This property will return null in case the service is resolved directly from the container.
Public propertyHandled
Gets a value indicating whether a previous Register registration has already been applied for the given ServiceType.
Public propertyImplementationType
Gets the closed generic implementation type that will be created by the container.
Public propertyServiceType
Gets the closed generic service type that is to be created.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from ApiObject.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from ApiObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from ApiObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from ApiObject.)

Please see the Register method for more information.
See Also