internal static string ExpressionToString(Expression e)
        {
            ExpressionWriter ew = new ExpressionWriter();

            string serialized = null;
            serialized = ew.Translate(e);

            if (ew.cantTranslateExpression)
            {
                throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, SR.ALinqCantTranslateExpression, e.ToString()));
            }

            return serialized;
        }
示例#2
0
        internal static string ExpressionToString(Expression e)
        {
            ExpressionWriter ew = new ExpressionWriter();

            string serialized = null;

            serialized = ew.Translate(e);

            if (ew.cantTranslateExpression)
            {
                throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, SR.ALinqCantTranslateExpression, e.ToString()));
            }

            return(serialized);
        }
示例#3
0
 private static string ExpressionToString(Expression expression)
 {
     return(ExpressionWriter.ExpressionToString(expression));
 }