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
typeTypeThe declaring type of the target method.
functionNamestringThe 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
typesType[]One or more declaring types of the target method.
functionNamestringThe name of the method to match.
Properties
FunctionName
Gets the method name that should match the call.
public string FunctionName { get; }
Property Value
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
eExpressionThe expression to match.
Returns
- bool
True if it matches; otherwise false.