/// <summary> /// Bind the parent of the LambdaToken /// </summary> /// <param name="queryToken">the parent token</param> /// <returns>the bound parent node</returns> private CollectionNode BindParentToken(QueryToken queryToken) { QueryNode parentNode = this.bindMethod(queryToken); CollectionNode parentCollectionNode = parentNode as CollectionNode; if (parentCollectionNode == null) { SingleValueOpenPropertyAccessNode parentOpenPropertyNode = parentNode as SingleValueOpenPropertyAccessNode; if (parentOpenPropertyNode == null) { throw new ODataException(ODataErrorStrings.MetadataBinder_LambdaParentMustBeCollection); } // support open collection properties return(new CollectionOpenPropertyAccessNode(parentOpenPropertyNode.Source, parentOpenPropertyNode.Name)); } return(parentCollectionNode); }
/// <summary> /// Visit a SingleValueOpenPropertyAccessNode /// </summary> /// <param name="nodeIn">the node to visit</param> /// <returns>Defined by the implementer</returns> public virtual T Visit(SingleValueOpenPropertyAccessNode nodeIn) { throw new NotImplementedException(); }