상속: SqlExpressionVisitor
 /// <summary>
 /// Gets the return type of the expression when evaluated.
 /// </summary>
 /// <param name="expression">The expression to check.</param>
 /// <param name="query">The query context used to evaluate the return type
 /// of the expression.</param>
 /// <param name="variableResolver">The object used to resolve variable references in the expression tree.</param>
 /// <returns>
 /// Returns the <see cref="SqlType"/> that an evaluation of the expression
 /// would return, or <c>null</c> if the final result of the evaluation has
 /// no return type.
 /// </returns>
 public static SqlType ReturnType(this SqlExpression expression, IRequest query, IVariableResolver variableResolver)
 {
     var visitor = new ReturnTypeVisitor(query, variableResolver);
     return visitor.GetType(expression);
 }
        /// <summary>
        /// Gets the return type of the expression when evaluated.
        /// </summary>
        /// <param name="expression">The expression to check.</param>
        /// <param name="query">The query context used to evaluate the return type
        /// of the expression.</param>
        /// <param name="variableResolver">The object used to resolve variable references in the expression tree.</param>
        /// <returns>
        /// Returns the <see cref="SqlType"/> that an evaluation of the expression
        /// would return, or <c>null</c> if the final result of the evaluation has
        /// no return type.
        /// </returns>
        public static SqlType ReturnType(this SqlExpression expression, IRequest query, IVariableResolver variableResolver)
        {
            var visitor = new ReturnTypeVisitor(query, variableResolver);

            return(visitor.GetType(expression));
        }
예제 #3
0
 /// <summary>
 /// Gets the return type of the expression when evaluated.
 /// </summary>
 /// <param name="expression">The expression to check.</param>
 /// <param name="queryContext">The query context used to evaluate the return type
 /// of the expression.</param>
 /// <param name="variableResolver">The object used to resolve variable references in the expression tree.</param>
 /// <returns>
 /// Returns the <see cref="DataType"/> that an evaluation of the expression
 /// would return, or <c>null</c> if the final result of the evaluation has
 /// no return type.
 /// </returns>
 public static DataType ReturnType(this SqlExpression expression, IQueryContext queryContext, IVariableResolver variableResolver)
 {
     var visitor = new ReturnTypeVisitor(queryContext, variableResolver);
     return visitor.GetType(expression);
 }