DecoratorPredicateContext Class

Simple Injector
An instance of this type will be supplied to the PredicateT delegate that is that is supplied to the RegisterDecorator overload that takes this delegate. This type contains information about the decoration that is about to be applied and it allows users to examine the given instance to see whether the decorator should be applied or not.
Inheritance Hierarchy

SystemObject
  SimpleInjector.AdvancedApiObject
    SimpleInjectorDecoratorPredicateContext

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

public sealed class DecoratorPredicateContext : ApiObject

The DecoratorPredicateContext type exposes the following members.

Properties

  NameDescription
Public propertyAppliedDecorators
Gets the list of the types of decorators that have already been applied to this instance.
Public propertyExpression
Gets the current Expression object that describes the intention to create a new instance with its currently applied decorators.
Public propertyImplementationType
Gets the type of the implementation that is created by the container and for which the decorator is about to be applied. The original implementation type will be returned, even if other decorators have already been applied to this type. Please note that the implementation type can not always be determined. In that case the closed generic service type will be returned.
Public propertyServiceType
Gets the closed generic service type for which the decorator is about to be applied. The original service type will be returned, even if other decorators have already been applied to this type.
Top
Methods

  NameDescription
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.)
Top
Remarks

Please see the RegisterDecorator method for more information.
See Also

Reference