Table of Contents

Class ExpressionCallSignatureAttribute

Namespace
Utils.Expressions
Assembly
Utils.dll

Marks a method as matching only method-call expressions that invoke a specific function name on a specific type. This is a specialized ExpressionSignatureAttribute for calls.

public class ExpressionCallSignatureAttribute : ExpressionSignatureAttribute
Inheritance
ExpressionCallSignatureAttribute
Inherited Members
Extension Methods

Constructors

ExpressionCallSignatureAttribute(Type, string)

Creates a new instance of ExpressionCallSignatureAttribute for calls to type.functionName.

public ExpressionCallSignatureAttribute(Type type, string functionName)

Parameters

type Type

The declaring type of the target method.

functionName string

The name of the method to match.

ExpressionCallSignatureAttribute(Type[], string)

Creates a new instance of ExpressionCallSignatureAttribute for calls to types.functionName.

public ExpressionCallSignatureAttribute(Type[] types, string functionName)

Parameters

types Type[]

One or more declaring types of the target method.

functionName string

The name of the method to match.

Properties

FunctionName

Gets the method name that should match the call.

public string FunctionName { get; }

Property Value

string

Types

Gets the declaring type(s) that should match the method call.

public Type[] Types { get; }

Property Value

Type[]

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 override bool Match(Expression e)

Parameters

e Expression

The expression to match.

Returns

bool

True if it matches; otherwise false.