Table of Contents

Class ExpressionSignatureAttribute

Namespace
Utils.Expressions
Assembly
Utils.dll

Marks a method or parameter as having a signature requirement for a certain ExpressionType. When used on a method, the method is considered for transformation if its attribute matches the current node type. When used on a parameter, it further restricts which sub-expressions are permissible.

[AttributeUsage(AttributeTargets.Method|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class ExpressionSignatureAttribute : Attribute
Inheritance
ExpressionSignatureAttribute
Derived
Inherited Members
Extension Methods

Constructors

ExpressionSignatureAttribute(ExpressionType)

Creates a new instance of ExpressionSignatureAttribute for a specific ExpressionType.

public ExpressionSignatureAttribute(ExpressionType expressionType)

Parameters

expressionType ExpressionType

The node type to match, or -1 for any.

Properties

ExpressionType

Gets the ExpressionType that this signature attribute matches. If set to -1, any ExpressionType is permitted.

public ExpressionType ExpressionType { get; }

Property Value

ExpressionType

Methods

Match(Expression)

Indicates whether the given expression matches the requirements of this attribute. The default implementation checks ExpressionType or allows any if set to -1.

public virtual bool Match(Expression e)

Parameters

e Expression

The expression to match.

Returns

bool

True if it matches; otherwise false.