public static Matcher <Expression> Argument <TParameter>(this Matcher <MethodCallExpression> matcher) { return(matcher.For(n => { var parameters = n.Method.GetParameters(); for (var i = 0; i < parameters.Length; i++) { if (parameters[i].ParameterType == typeof(TParameter)) { return n.Arguments[i]; } } return null; })); }
public static Matcher <T> Value <T>(this Matcher <ConstantExpression> matcher) { return(matcher.For(c => c.Value).As <T>()); }