internal static string ExpressionToString(DataServiceContext context, Expression e) { ExpressionWriter ew = new ExpressionWriter(context); string serialized = ew.Translate(e); if (ew.cantTranslateExpression) { throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(e.ToString())); } return serialized; }
internal static string ExpressionToString(DataServiceContext context, Expression e) { ExpressionWriter ew = new ExpressionWriter(context); string serialized = ew.Translate(e); if (ew.cantTranslateExpression) { throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(e.ToString())); } return(serialized); }
internal static string ExpressionToString(DataServiceContext context, Expression e, ref Version uriVersion) { ExpressionWriter writer = new ExpressionWriter(context); string str = writer.Translate(e); WebUtil.RaiseVersion(ref uriVersion, writer.uriVersion); if (writer.cantTranslateExpression) { throw new NotSupportedException(System.Data.Services.Client.Strings.ALinq_CantTranslateExpression(e.ToString())); } return(str); }
/// <summary> /// Serializes an expression to a string /// </summary> /// <param name='context'>Data context used to generate type names for types.</param> /// <param name="e">Expression to serialize</param> /// <param name='inPath'>Whether or not the expression being written is part of the path of the URI.</param> /// <param name="uriVersion">the request data service version for the uri</param> /// <returns>serialized expression</returns> internal static string ExpressionToString(DataServiceContext context, Expression e, bool inPath, ref Version uriVersion) { ExpressionWriter ew = new ExpressionWriter(context, inPath); string serialized = ew.Translate(e); WebUtil.RaiseVersion(ref uriVersion, ew.uriVersion); if (ew.cantTranslateExpression) { throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(e.ToString())); } return(serialized); }
internal static string ExpressionToString(DataServiceContext context, Expression e, ref Version uriVersion) { ExpressionWriter writer = new ExpressionWriter(context); string str = writer.Translate(e); WebUtil.RaiseVersion(ref uriVersion, writer.uriVersion); if (writer.cantTranslateExpression) { throw new NotSupportedException(System.Data.Services.Client.Strings.ALinq_CantTranslateExpression(e.ToString())); } return str; }