Class FastArgExpressionParser
Parses expression trees that use FastArg markers into provider-neutral matcher metadata.
Inherited Members
Namespace: FastMoq.Providers
Assembly: FastMoq.Abstractions.dll
Syntax
public static class FastArgExpressionParser
Methods
ContainsMatcher(LambdaExpression)
Determines whether the supplied expression contains any recognized FastArg or compatibility matcher markers.
Declaration
public static bool ContainsMatcher(LambdaExpression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| LambdaExpression | expression | The expression to inspect. |
Returns
| Type | Description |
|---|---|
| bool | true when the expression contains at least one matcher marker; otherwise false. |
ParseInvocation(LambdaExpression)
Parses the supplied method-call expression into a provider-neutral invocation matcher.
Declaration
public static FastInvocationMatcher ParseInvocation(LambdaExpression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| LambdaExpression | expression | The method-call expression to parse. |
Returns
| Type | Description |
|---|---|
| FastInvocationMatcher | A parsed invocation matcher describing the target method and argument matchers. |
TryParseMatcher(Expression, Type, out FastArgumentMatcher)
Attempts to parse a single expression node as a recognized FastMoq matcher.
Declaration
public static bool TryParseMatcher(Expression expression, Type parameterType, out FastArgumentMatcher matcher)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression | expression | The expression node to inspect. |
| Type | parameterType | The target runtime parameter type. |
| FastArgumentMatcher | matcher | When this method returns true, contains the parsed matcher. |
Returns
| Type | Description |
|---|---|
| bool | true when the expression is a recognized matcher marker; otherwise false. |