internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { if ((this.parent == null) || ((!this.InSubScope && (this.parent.NodeType != ExpressionType.MemberAccess)) && (this.parent.NodeType != ExpressionType.TypeAs))) { string str = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(System.Data.Services.Client.Strings.ALinq_CantTranslateExpression(str)); } if (this.InSubScope) { this.builder.Append("$it"); } return(ire); }
internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { Debug.Assert(ire != null, "ire != null"); if (this.parent == null || this.parent.NodeType != ExpressionType.MemberAccess) { string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText)); } return(ire); }
internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { Debug.Assert(ire != null, "ire != null"); if (this.parent == null || this.parent.NodeType != ExpressionType.MemberAccess) { string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText)); } return ire; }
/// <summary> /// Input resource set references are intentionally omitted from the URL string. /// </summary> /// <param name="ire">The input reference</param> /// <returns>The same input reference expression</returns> internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { // This method intentionally does not write anything to the URI. // This is how 'Where(<input>.Id == 5)' becomes '$filter=Id eq 5'. Debug.Assert(ire != null, "ire != null"); if (this.parent == null || this.parent.NodeType != ExpressionType.MemberAccess) { // Ideally we refer to the parent expression as the un-translatable one, // because we cannot reference 'this' as a standalone expression; however // if the parent is null for any reasonn, we fall back to the expression itself. string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText)); } return ire; }
/// <summary> /// Input resource set references are intentionally omitted from the URL string. /// </summary> /// <param name="ire">The input reference</param> /// <returns>The same input reference expression</returns> internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { // This method intentionally does not write anything to the URI. // This is how 'Where(<input>.Id == 5)' becomes '$filter=Id eq 5'. Debug.Assert(ire != null, "ire != null"); if (this.parent == null || this.parent.NodeType != ExpressionType.MemberAccess) { // Ideally we refer to the parent expression as the un-translatable one, // because we cannot reference 'this' as a standalone expression; however // if the parent is null for any reasonn, we fall back to the expression itself. string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText)); } return(ire); }
/// <summary> /// Input resource set references are intentionally omitted from the URL string for the top level /// refences to input parameter (i.e. outside of any/all methods). /// For parameter references to input (range variable for Where) inside any/all methods we write "$it". /// </summary> /// <param name="ire">The input reference</param> /// <returns>The same input reference expression</returns> internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { // This method intentionally does not write anything to the URI for implicit references to the input parameter ($it). // This is how 'Where(<input>.Id == 5)' becomes '$filter=Id eq 5'. Debug.Assert(ire != null, "ire != null"); if (this.parent == null || (!this.InSubScope && this.parent.NodeType != ExpressionType.MemberAccess && this.parent.NodeType != ExpressionType.TypeAs)) { // Ideally we refer to the parent expression as the un-translatable one, // because we cannot reference 'this' as a standalone expression; however // if the parent is null for any reasonn, we fall back to the expression itself. string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText)); } // Write "$it" for input parameter reference inside any/all methods if (this.InSubScope) { this.builder.Append(XmlConstants.ImplicitFilterParameter); } return(ire); }
internal override Expression VisitInputReferenceExpression(InputReferenceExpression ire) { if ((this.parent == null) || ((!this.InSubScope && (this.parent.NodeType != ExpressionType.MemberAccess)) && (this.parent.NodeType != ExpressionType.TypeAs))) { string str = (this.parent != null) ? this.parent.ToString() : ire.ToString(); throw new NotSupportedException(System.Data.Services.Client.Strings.ALinq_CantTranslateExpression(str)); } if (this.InSubScope) { this.builder.Append("$it"); } return ire; }