コード例 #1
0
        /// <summary>Method which converts expressions from the DSP "syntax" into the LINQ to Objects "syntax".</summary>
        /// <param name="expression">The expression to process.</param>
        /// <returns>A new expression which is the result of the conversion.</returns>
        private Expression ProcessExpression(Expression expression)
        {
            if (DSPServiceDefinition.Current != null && DSPServiceDefinition.Current.ExpressionTreeInterceptor != null)
            {
                expression = DSPServiceDefinition.Current.ExpressionTreeInterceptor(expression);
            }

            return(DSPMethodTranslatingVisitor.TranslateExpression(expression));
        }
コード例 #2
0
        /// <summary>Method which translates an expression using the <see cref="DataServiceProviderMethods"/> methods
        /// into a new expression which can be evaluated by LINQ to Objects.</summary>
        /// <param name="expression">The expression to translate.</param>
        /// <returns>The translated expression.</returns>
        public static Expression TranslateExpression(Expression expression)
        {
            DSPMethodTranslatingVisitor visitor = new DSPMethodTranslatingVisitor();

            return(visitor.Visit(expression));
        }
コード例 #3
0
 /// <summary>Method which translates an expression using the <see cref="DataServiceProviderMethods"/> methods
 /// into a new expression which can be evaluated by LINQ to Objects.</summary>
 /// <param name="expression">The expression to translate.</param>
 /// <returns>The translated expression.</returns>
 public static Expression TranslateExpression(Expression expression)
 {
     DSPMethodTranslatingVisitor visitor = new DSPMethodTranslatingVisitor();
     return visitor.Visit(expression);
 }