Esempio n. 1
0
        public bool ItIsMatch(Expression setupArgument, object actualValue)
        {
            MethodCallExpression expression      = (MethodCallExpression)setupArgument;
            UnaryExpression      unaryExpression = (UnaryExpression)expression.Arguments[0];

            Delegate compiledExpression = _expressionCompiler.CompileExpression((LambdaExpression)unaryExpression.Operand);
            bool     returnValue        = (bool)compiledExpression.DynamicInvoke(actualValue);

            return(returnValue);
        }