Ejemplo n.º 1
0
        protected virtual Expression TranslateMethodCall(MethodCallFilterExpression methodCall)
        {
            var arguments = methodCall.Arguments.Select(Translate).ToArray();

            var strategy = new MethodCallExpressionGeneratorStrategy();

            return(strategy.Generate(methodCall.Method, arguments));
        }
        protected virtual Expression TranslateMethodCall(MethodCallFilterExpression methodCall)
        {
            var arguments = methodCall.Arguments.Select(Translate).ToArray();

            var strategy = new MethodCallExpressionGeneratorStrategy();

            return strategy.Generate(methodCall.Method, arguments);
        }
Ejemplo n.º 3
0
        public void ToString_ValidFunctionAndNonEmptyArguments_GeneratesCorrectString()
        {
            var methodCallExpression = new MethodCallFilterExpression(Function.Trim, new ConstantFilterExpression("hello  "));

            Assert.That(methodCallExpression.ToString(), Is.EqualTo("trim('hello  ')"));
        }
        public void ToString_ValidFunctionAndNonEmptyArguments_GeneratesCorrectString()
        {
            var methodCallExpression = new MethodCallFilterExpression(Function.Trim, new ConstantFilterExpression("hello  "));

            Assert.That(methodCallExpression.ToString(), Is.EqualTo("trim('hello  ')"));
        }