/// <summary> /// Initializes a new instance of the <see cref="ExpressionCallMatcher" /> class. /// </summary> /// <param name="parsedExpression">The parsed call specification.</param> /// <param name="constraintFactory">The constraint factory.</param> /// <param name="methodInfoManager">The method info manager to use.</param> public ExpressionCallMatcher(ParsedCallExpression parsedExpression, ExpressionArgumentConstraintFactory constraintFactory, MethodInfoManager methodInfoManager) { this.methodInfoManager = methodInfoManager; this.Method = parsedExpression.CalledMethod; this.argumentConstraints = GetArgumentConstraints(parsedExpression.ArgumentsExpressions, constraintFactory).ToArray(); this.argumentsPredicate = this.ArgumentsMatchesArgumentConstraints; }
/// <summary> /// Initializes a new instance of the <see cref="ExpressionCallMatcher" /> class. /// </summary> /// <param name="callSpecification">The call specification.</param> /// <param name="constraintFactory">The constraint factory.</param> /// <param name="methodInfoManager">The method info manager to use.</param> /// <param name="callExpressionParser">A parser to use to parse call expressions.</param> public ExpressionCallMatcher(LambdaExpression callSpecification, ExpressionArgumentConstraintFactory constraintFactory, MethodInfoManager methodInfoManager, ICallExpressionParser callExpressionParser) { this.methodInfoManager = methodInfoManager; var parsedExpression = callExpressionParser.Parse(callSpecification); this.Method = parsedExpression.CalledMethod; this.argumentConstraints = GetArgumentConstraints(parsedExpression.ArgumentsExpressions, constraintFactory).ToArray(); this.argumentsPredicate = this.ArgumentsMatchesArgumentConstraints; }
public RecordedCallRule(MethodInfoManager methodInfoManager) { this.methodInfoManager = methodInfoManager; }
public CastleDynamicProxyInterceptionValidator(MethodInfoManager methodInfoManager) { this.methodInfoManager = methodInfoManager; }