/// <summary> /// Visit an <see cref="InputReferenceExpression"/>, producing a new InputReferenceExpression /// based on the visited form of the <see cref="QueryableResourceExpression"/> that is referenced by /// the InputReferenceExpression argument, <paramref name="ire"/>. /// </summary> /// <param name="ire">InputReferenceExpression expression to visit</param> /// <returns>Visited InputReferenceExpression expression</returns> internal virtual Expression VisitInputReferenceExpression(InputReferenceExpression ire) { Debug.Assert(ire != null, "ire != null -- otherwise caller never should have visited here"); ResourceExpression re = (ResourceExpression)this.Visit(ire.Target); return(re.CreateReference()); }
/// <summary> /// Returns an <see cref="InputReferenceExpression"/> that references the specified resource, /// and also adds the the resource to the hashset of resources that were referenced by the /// expression that is being rebound. /// </summary> /// <param name="resource">The resource for which a reference was found</param> /// <returns>An InputReferenceExpression that represents a reference to the specified resource</returns> private Expression CreateReference(ResourceExpression resource) { this.referencedInputs.Add(resource); return(resource.CreateReference()); }
/// <summary> /// Returns an <see cref="InputReferenceExpression"/> that references the specified resource, /// and also adds the the resource to the hashset of resources that were referenced by the /// expression that is being rebound. /// </summary> /// <param name="resource">The resource for which a reference was found</param> /// <returns>An InputReferenceExpression that represents a reference to the specified resource</returns> private Expression CreateReference(ResourceExpression resource) { this.referencedInputs.Add(resource); return resource.CreateReference(); }