/// <summary> /// Binds a parameter token. /// </summary> /// <param name="rangeVariableToken">The parameter token to bind.</param> /// <param name="state">The state of metadata binding.</param> /// <returns>The bound query node.</returns> internal static SingleValueNode BindRangeVariableToken(RangeVariableToken rangeVariableToken, BindingState state) { ExceptionUtils.CheckArgumentNotNull(rangeVariableToken, "rangeVariableToken"); RangeVariable rangeVariable = state.RangeVariables.SingleOrDefault(p => p.Name == rangeVariableToken.Name); if (rangeVariable == null) { throw new ODataException(ODataErrorStrings.MetadataBinder_ParameterNotInScope(rangeVariableToken.Name)); } return(NodeFactory.CreateRangeVariableReferenceNode(rangeVariable)); }
/// <summary> /// Binds a parameter token. /// </summary> /// <param name="rangeVariableToken">The parameter token to bind.</param> /// <returns>The bound query node.</returns> protected virtual SingleValueNode BindRangeVariable(RangeVariableToken rangeVariableToken) { return(RangeVariableBinder.BindRangeVariableToken(rangeVariableToken, this.BindingState)); }
/// <summary> /// Visits a RangeVariableToken /// </summary> /// <param name="tokenIn">The RangeVariableToken to bind</param> /// <returns>A Resource or NonResource RangeVariableReferenceNode bound to this RangeVariableToken</returns> public virtual T Visit(RangeVariableToken tokenIn) { throw new NotImplementedException(); }