Exemplo n.º 1
0
 /// <summary>
 /// Accept a <see cref="QueryNodeVisitor{T}"/> that walks a tree of <see cref="QueryNode"/>s.
 /// </summary>
 /// <typeparam name="T">Type that the visitor will return after visiting this token.</typeparam>
 /// <param name="visitor">An implementation of the visitor interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the visitor.</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input visitor is null.</exception>
 public override T Accept <T>(QueryNodeVisitor <T> visitor)
 {
     ExceptionUtils.CheckArgumentNotNull(visitor, "visitor");
     return(visitor.Visit(this));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Accept a <see cref="QueryNodeVisitor{T}"/> that walks a tree of <see cref="QueryNode"/>s.
 /// </summary>
 /// <typeparam name="T">Type that the visitor will return after visiting this token.</typeparam>
 /// <param name="visitor">An implementation of the visitor interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the visitor.</returns>
 public virtual T Accept <T>(QueryNodeVisitor <T> visitor)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Accept a <see cref="QueryNodeVisitor{T}" /> to walk a tree of <see cref="QueryNode" />s.
 /// </summary>
 /// <typeparam name="T">Type that the visitor will return after visiting this token.</typeparam>
 /// <param name="visitor">An implementation of the visitor interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the visitor.</returns>
 public override T Accept <T>(QueryNodeVisitor <T> visitor)
 {
     return(visitor.Visit(this));
 }
Exemplo n.º 4
0
 public override T Accept <T>(QueryNodeVisitor <T> visitor)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 /// <inheritdoc />
 public override T Accept <T>(QueryNodeVisitor <T> visitor) => visitor.Visit(this);
Exemplo n.º 6
0
 /// <summary>
 /// Accept a <see cref="QueryNodeVisitor{T}"/> that walks a tree of <see cref="QueryNode"/>s.
 /// </summary>
 /// <typeparam name="T">Type that the visitor will return after visiting this token.</typeparam>
 /// <param name="visitor">An implementation of the visitor interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the visitor.</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input visitor is null.</exception>
 public override T Accept <T>(QueryNodeVisitor <T> visitor)
 {
     DebugUtils.CheckNoExternalCallers();
     ExceptionUtils.CheckArgumentNotNull(visitor, "visitor");
     return(visitor.Visit(this));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Accept a <see cref="QueryNodeVisitor{T}"/> that walks the tree of <see cref="QueryNode"/>s.
 /// </summary>
 /// <typeparam name="TResult">The type returned by the visitor.</typeparam>
 /// <param name="visitor">A visitor implementation used to walk the <see cref="QueryNode"/> tree.</param>
 /// <returns>An object whose type is determined by the type parameter <typeparamref name="TResult"/>.</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the <paramref name="visitor"/> argument is null.</exception>
 public override TResult Accept <TResult>(QueryNodeVisitor <TResult> visitor)
 {
     Check.IsNotNull(visitor, nameof(visitor));
     return(visitor.Visit(this));
 }
Exemplo n.º 8
0
        private S RewriteFilter(ODataQueryOptions options)
        {
            QueryNodeVisitor <S> rewrite = GetNewQueryNodeStringVisitor();

            return(options.Filter?.FilterClause.Expression.Accept(rewrite));
        }