From 0b54111ee7909e71263b83fc60268de0de817986 Mon Sep 17 00:00:00 2001 From: Mohamed Nassar Date: Tue, 2 May 2017 15:33:10 -0700 Subject: [PATCH] Expose UriQueryExpressionParser.ParseFilter as a public API (#805) Expose UriQueryExpressionParser and QueryToken object model publicly --- .../ALinq/ResourceBinder.cs | 3 +- .../Microsoft.OData.Client.Portable.csproj | 4 +- .../Microsoft.OData.Client.csproj | 4 +- .../Microsoft.OData.Core.NetFX35.csproj | 6 +- .../Microsoft.OData.Core.csproj | 2 +- .../Aggregation/AggregateExpressionToken.cs | 32 +- .../UriParser/Aggregation/AggregateToken.cs | 15 +- .../Aggregation/ApplyTransformationToken.cs | 2 +- .../UriParser/Aggregation/GroupByToken.cs | 18 +- .../UriParser/Binders/ExpandTreeNormalizer.cs | 14 +- .../UriParser/Binders/SelectExpandBinder.cs | 2 +- .../UriParser/NamedValue.cs | 2 +- .../UriParser/Parsers/SelectExpandParser.cs | 4 +- .../Parsers/UriQueryExpressionParser.cs | 31 +- .../UriParser/SyntacticAst/AllToken.cs | 2 +- .../UriParser/SyntacticAst/AnyToken.cs | 2 +- .../SyntacticAst/BinaryOperatorToken.cs | 2 +- .../SyntacticAst/CustomQueryOptionToken.cs | 2 +- .../SyntacticAst/DottedIdentifierToken.cs | 2 +- .../UriParser/SyntacticAst/EndPathToken.cs | 2 +- .../UriParser/SyntacticAst/ExpandTermToken.cs | 28 +- .../UriParser/SyntacticAst/ExpandToken.cs | 2 +- .../SyntacticAst/FunctionCallToken.cs | 2 +- .../SyntacticAst/FunctionParameterToken.cs | 2 +- .../UriParser/SyntacticAst/InnerPathToken.cs | 2 +- .../UriParser/SyntacticAst/LambdaToken.cs | 2 +- .../UriParser/SyntacticAst/LiteralToken.cs | 2 +- .../UriParser/SyntacticAst/NonSystemToken.cs | 2 +- .../UriParser/SyntacticAst/OrderByToken.cs | 2 +- .../SyntacticAst/PathSegmentToken.cs | 2 +- .../UriParser/SyntacticAst/PathToken.cs | 2 +- .../UriParser/SyntacticAst/QueryToken.cs | 2 +- .../QueryTokenKind.cs | 3 +- .../SyntacticAst/RangeVariableToken.cs | 2 +- .../UriParser/SyntacticAst/SelectToken.cs | 2 +- .../UriParser/SyntacticAst/StarToken.cs | 2 +- .../UriParser/SyntacticAst/SystemToken.cs | 2 +- .../SyntacticAst/UnaryOperatorToken.cs | 2 +- .../Visitors/IPathSegmentTokenVisitor.cs | 4 +- .../Visitors/ISyntacticTreeVisitor.cs | 2 +- .../Binders/ExpandTreeNormalizerTests.cs | 14 +- .../Parsers/ExpandOptionParserTests.cs | 12 +- .../Parsers/SelectExpandParserTests.cs | 8 +- .../SyntacticAst/ExpandTermTokenTests.cs | 4 +- .../UriParser/TokenAssertions.cs | 4 +- .../PublicApi/PublicApi.bsl | 688 ++++++++++++++++++ 46 files changed, 853 insertions(+), 97 deletions(-) rename src/Microsoft.OData.Core/UriParser/{TreeNodeKinds => SyntacticAst}/QueryTokenKind.cs (91%) diff --git a/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs b/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs index bb12a1858f..306e98a808 100644 --- a/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs +++ b/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs @@ -21,7 +21,8 @@ namespace Microsoft.OData.Client using Microsoft.OData; using Microsoft.OData.UriParser; using Microsoft.OData.Edm; - + using PathSegmentToken = Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken; + using NonSystemToken = Microsoft.OData.Client.ALinq.UriParser.NonSystemToken; #endregion Namespaces /// diff --git a/src/Microsoft.OData.Client/Build.Portable/Microsoft.OData.Client.Portable.csproj b/src/Microsoft.OData.Client/Build.Portable/Microsoft.OData.Client.Portable.csproj index 0d38a15f85..9764a85656 100644 --- a/src/Microsoft.OData.Client/Build.Portable/Microsoft.OData.Client.Portable.csproj +++ b/src/Microsoft.OData.Client/Build.Portable/Microsoft.OData.Client.Portable.csproj @@ -160,8 +160,8 @@ ALinq\UriParser\SyntacticAst\QueryToken.cs - - ALinq\UriParser\TreeNodeKinds\QueryTokenKind.cs + + ALinq\UriParser\SyntacticAst\QueryTokenKind.cs ALinq\UriParser\SyntacticAst\RangeVariableToken.cs diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj b/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj index 2818cd4fff..e87cf05d9a 100644 --- a/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj +++ b/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj @@ -166,8 +166,8 @@ ALinq\UriParser\SyntacticAst\QueryToken.cs - - ALinq\UriParser\TreeNodeKinds\QueryTokenKind.cs + + ALinq\UriParser\SyntacticAst\QueryTokenKind.cs ALinq\UriParser\SyntacticAst\RangeVariableToken.cs diff --git a/src/Microsoft.OData.Core/Build.Net35/Microsoft.OData.Core.NetFX35.csproj b/src/Microsoft.OData.Core/Build.Net35/Microsoft.OData.Core.NetFX35.csproj index 8ddbf8a7f5..5a34f0a896 100644 --- a/src/Microsoft.OData.Core/Build.Net35/Microsoft.OData.Core.NetFX35.csproj +++ b/src/Microsoft.OData.Core/Build.Net35/Microsoft.OData.Core.NetFX35.csproj @@ -1312,6 +1312,9 @@ Microsoft\OData\Core\UriParser\SyntacticAst\QueryToken.cs + + Microsoft\OData\Core\UriParser\SyntacticAst\QueryTokenKind.cs + Microsoft\OData\Core\UriParser\SyntacticAst\RangeVariableToken.cs @@ -1339,9 +1342,6 @@ Microsoft\OData\Core\UriParser\TreeNodeKinds\QueryNodeKind.cs - - Microsoft\OData\Core\UriParser\TreeNodeKinds\QueryTokenKind.cs - Microsoft\OData\Core\UriParser\TreeNodeKinds\RequestTargetKind.cs diff --git a/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj b/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj index 5db75002ff..a03b3e4c0b 100644 --- a/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj +++ b/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj @@ -542,7 +542,7 @@ - + diff --git a/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateExpressionToken.cs b/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateExpressionToken.cs index a76d0951e4..58c1d7880f 100644 --- a/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateExpressionToken.cs +++ b/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateExpressionToken.cs @@ -14,7 +14,10 @@ namespace Microsoft.OData.UriParser.Aggregation #endif using Microsoft.OData.UriParser; - internal sealed class AggregateExpressionToken : QueryToken + /// + /// Query token representing an Aggregate expression. + /// + public sealed class AggregateExpressionToken : QueryToken { private readonly QueryToken expression; @@ -24,6 +27,12 @@ internal sealed class AggregateExpressionToken : QueryToken private readonly string alias; + /// + /// Create an AggregateExpressionToken. + /// + /// The aggregate expression. + /// The aggregation method. + /// The alias for this query token. public AggregateExpressionToken(QueryToken expression, AggregationMethod method, string alias) { ExceptionUtils.CheckArgumentNotNull(expression, "expression"); @@ -34,32 +43,53 @@ public AggregateExpressionToken(QueryToken expression, AggregationMethod method, this.alias = alias; } + /// + /// Create an AggregateExpressionToken. + /// + /// The aggregate expression. + /// The aggregate method definition. + /// The alias for this query token. public AggregateExpressionToken(QueryToken expression, AggregationMethodDefinition methodDefinition, string alias) : this(expression, methodDefinition.MethodKind, alias) { this.methodDefinition = methodDefinition; } + /// + /// Gets the kind of this token. + /// public override QueryTokenKind Kind { get { return QueryTokenKind.AggregateExpression; } } + /// + /// Gets the AggregationMethod of this token. + /// public AggregationMethod Method { get { return this.method; } } + /// + /// Gets the aggregate method definition. + /// public AggregationMethodDefinition MethodDefinition { get { return this.methodDefinition; } } + /// + /// Gets the expression. + /// public QueryToken Expression { get { return this.expression; } } + /// + /// Gets the alias. + /// public string Alias { get { return this.alias; } diff --git a/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateToken.cs b/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateToken.cs index b64b5f2569..de0a60e195 100644 --- a/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateToken.cs +++ b/src/Microsoft.OData.Core/UriParser/Aggregation/AggregateToken.cs @@ -13,21 +13,34 @@ namespace Microsoft.OData.UriParser.Aggregation using System.Collections.Generic; using Microsoft.OData.UriParser; - internal sealed class AggregateToken : ApplyTransformationToken + /// + /// Query token representing an Aggregate token. + /// + public sealed class AggregateToken : ApplyTransformationToken { private readonly IEnumerable expressions; + /// + /// Create an AggregateToken. + /// + /// The list of AggregateExpressionToken. public AggregateToken(IEnumerable expressions) { ExceptionUtils.CheckArgumentNotNull(expressions, "expressions"); this.expressions = expressions; } + /// + /// Gets the kind of this token. + /// public override QueryTokenKind Kind { get { return QueryTokenKind.Aggregate; } } + /// + /// Gets the list of AggregateExpressionToken. + /// public IEnumerable Expressions { get diff --git a/src/Microsoft.OData.Core/UriParser/Aggregation/ApplyTransformationToken.cs b/src/Microsoft.OData.Core/UriParser/Aggregation/ApplyTransformationToken.cs index bbc9f444d9..66ef0e79de 100644 --- a/src/Microsoft.OData.Core/UriParser/Aggregation/ApplyTransformationToken.cs +++ b/src/Microsoft.OData.Core/UriParser/Aggregation/ApplyTransformationToken.cs @@ -15,7 +15,7 @@ namespace Microsoft.OData.UriParser.Aggregation /// /// Base class for Apply transformation tokens /// - internal abstract class ApplyTransformationToken : QueryToken + public abstract class ApplyTransformationToken : QueryToken { } } diff --git a/src/Microsoft.OData.Core/UriParser/Aggregation/GroupByToken.cs b/src/Microsoft.OData.Core/UriParser/Aggregation/GroupByToken.cs index cc7de84750..acf337b25a 100644 --- a/src/Microsoft.OData.Core/UriParser/Aggregation/GroupByToken.cs +++ b/src/Microsoft.OData.Core/UriParser/Aggregation/GroupByToken.cs @@ -13,12 +13,20 @@ namespace Microsoft.OData.UriParser.Aggregation using System.Collections.Generic; using Microsoft.OData.UriParser; - internal sealed class GroupByToken : ApplyTransformationToken + /// + /// Query token representing a GroupBy token. + /// + public sealed class GroupByToken : ApplyTransformationToken { private readonly IEnumerable properties; private readonly ApplyTransformationToken child; + /// + /// Create a GroupByToken. + /// + /// The list of group by properties. + /// The child of this token. public GroupByToken(IEnumerable properties, ApplyTransformationToken child) { ExceptionUtils.CheckArgumentNotNull(properties, "properties"); @@ -28,18 +36,24 @@ public GroupByToken(IEnumerable properties, ApplyTransformationTok } /// - /// The kind of the query token. + /// Gets the kind of this token. /// public override QueryTokenKind Kind { get { return QueryTokenKind.AggregateGroupBy; } } + /// + /// Gets the list of group by properties. + /// public IEnumerable Properties { get { return this.properties; } } + /// + /// Gets the child of this token. + /// public ApplyTransformationToken Child { get { return this.child; } diff --git a/src/Microsoft.OData.Core/UriParser/Binders/ExpandTreeNormalizer.cs b/src/Microsoft.OData.Core/UriParser/Binders/ExpandTreeNormalizer.cs index 81142960af..870f35f00b 100644 --- a/src/Microsoft.OData.Core/UriParser/Binders/ExpandTreeNormalizer.cs +++ b/src/Microsoft.OData.Core/UriParser/Binders/ExpandTreeNormalizer.cs @@ -44,7 +44,7 @@ public ExpandToken NormalizePaths(ExpandToken treeToInvert) foreach (ExpandTermToken term in treeToInvert.ExpandTerms) { PathReverser pathReverser = new PathReverser(); - PathSegmentToken reversedPath = term.PathToNavProp.Accept(pathReverser); + PathSegmentToken reversedPath = term.PathToNavigationProp.Accept(pathReverser); // we also need to call the select token normalizer for this level to reverse the select paths SelectToken newSelectToken = term.SelectOption; @@ -86,7 +86,7 @@ public ExpandToken CombineTerms(ExpandToken treeToCollapse) { ExpandToken newSubExpand = CombineTerms(termToken.ExpandOption); finalTermToken = new ExpandTermToken( - termToken.PathToNavProp, + termToken.PathToNavigationProp, termToken.FilterOption, termToken.OrderByOptions, termToken.TopOption, @@ -112,12 +112,12 @@ public ExpandToken CombineTerms(ExpandToken treeToCollapse) /// the combined token, or, if the two are mutually exclusive, the same tokens public ExpandTermToken CombineTerms(ExpandTermToken existingToken, ExpandTermToken newToken) { - Debug.Assert(new PathSegmentTokenEqualityComparer().Equals(existingToken.PathToNavProp, newToken.PathToNavProp), "Paths should be equal."); + Debug.Assert(new PathSegmentTokenEqualityComparer().Equals(existingToken.PathToNavigationProp, newToken.PathToNavigationProp), "Paths should be equal."); List childNodes = CombineChildNodes(existingToken, newToken).ToList(); SelectToken combinedSelects = CombineSelects(existingToken, newToken); return new ExpandTermToken( - existingToken.PathToNavProp, + existingToken.PathToNavigationProp, existingToken.FilterOption, existingToken.OrderByOptions, existingToken.TopOption, @@ -177,13 +177,13 @@ private void AddChildOptionsToDictionary(ExpandTermToken newToken, Dictionary combinedTerms, ExpandTermToken expandedTerm) { ExpandTermToken existingTerm; - if (combinedTerms.TryGetValue(expandedTerm.PathToNavProp, out existingTerm)) + if (combinedTerms.TryGetValue(expandedTerm.PathToNavigationProp, out existingTerm)) { - combinedTerms[expandedTerm.PathToNavProp] = CombineTerms(expandedTerm, existingTerm); + combinedTerms[expandedTerm.PathToNavigationProp] = CombineTerms(expandedTerm, existingTerm); } else { - combinedTerms.Add(expandedTerm.PathToNavProp, expandedTerm); + combinedTerms.Add(expandedTerm.PathToNavigationProp, expandedTerm); } } diff --git a/src/Microsoft.OData.Core/UriParser/Binders/SelectExpandBinder.cs b/src/Microsoft.OData.Core/UriParser/Binders/SelectExpandBinder.cs index 17dd13f155..197b95dc7f 100644 --- a/src/Microsoft.OData.Core/UriParser/Binders/SelectExpandBinder.cs +++ b/src/Microsoft.OData.Core/UriParser/Binders/SelectExpandBinder.cs @@ -180,7 +180,7 @@ private SelectItem GenerateExpandItem(ExpandTermToken tokenIn) { ExceptionUtils.CheckArgumentNotNull(tokenIn, "tokenIn"); - PathSegmentToken currentToken = tokenIn.PathToNavProp; + PathSegmentToken currentToken = tokenIn.PathToNavigationProp; IEdmStructuredType currentLevelEntityType = this.EdmType; List pathSoFar = new List(); diff --git a/src/Microsoft.OData.Core/UriParser/NamedValue.cs b/src/Microsoft.OData.Core/UriParser/NamedValue.cs index ab7c85866e..b9c1e0d56c 100644 --- a/src/Microsoft.OData.Core/UriParser/NamedValue.cs +++ b/src/Microsoft.OData.Core/UriParser/NamedValue.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Class representing a single named value (name and value pair). /// - internal sealed class NamedValue + public sealed class NamedValue { /// /// The name of the value. Or null if the name was not used for this value. diff --git a/src/Microsoft.OData.Core/UriParser/Parsers/SelectExpandParser.cs b/src/Microsoft.OData.Core/UriParser/Parsers/SelectExpandParser.cs index c65f7b63ea..5aa1a70aef 100644 --- a/src/Microsoft.OData.Core/UriParser/Parsers/SelectExpandParser.cs +++ b/src/Microsoft.OData.Core/UriParser/Parsers/SelectExpandParser.cs @@ -270,7 +270,7 @@ private ExpandToken ParseCommaSeperatedExpandList(Func explicitedTokens = new List(); foreach (var tmpTokens in termTokens) { - var pathToNav = tmpTokens.PathToNavProp; + var pathToNav = tmpTokens.PathToNavigationProp; if (pathToNav.Identifier != UriQueryConstants.RefSegment) { explicitedTokens.Add(pathToNav.Identifier); @@ -284,7 +284,7 @@ private ExpandToken ParseCommaSeperatedExpandList(Func /// Parser which consumes the query expression ($filter, $orderby) and produces the lexical object model. /// - internal sealed class UriQueryExpressionParser + public sealed class UriQueryExpressionParser { /// /// The maximum number of recursion nesting allowed. @@ -55,6 +55,15 @@ internal sealed class UriQueryExpressionParser /// private bool enableCaseInsensitiveBuiltinIdentifier = false; + /// + /// Creates a UriQueryExpressionParser. + /// + /// The maximum depth of each part of the query - a recursion limit. + public UriQueryExpressionParser(int maxDepth) + : this(maxDepth, false) + { + } + /// /// Constructor. /// @@ -95,6 +104,16 @@ internal ExpressionLexer Lexer get { return this.lexer; } } + /// + /// Parses the $filter expression. + /// + /// The $filter expression string to parse. + /// The lexical token representing the filter. + public QueryToken ParseFilter(string filter) + { + return this.ParseExpressionText(filter); + } + /// /// Parses a literal. /// @@ -186,16 +205,6 @@ internal static string GetEdmConstantNames(IEdmTypeReference edmTypeReference) } } - /// - /// Parses the $filter expression. - /// - /// The $filter expression string to parse. - /// The lexical token representing the filter. - internal QueryToken ParseFilter(string filter) - { - return this.ParseExpressionText(filter); - } - internal IEnumerable ParseApply(string apply) { Debug.Assert(apply != null, "apply != null"); diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/AllToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/AllToken.cs index c01ea76bcd..635fda2fb4 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/AllToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/AllToken.cs @@ -16,7 +16,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing the All Query /// - internal sealed class AllToken : LambdaToken + public sealed class AllToken : LambdaToken { /// /// Create a AllToken given the expression, parameter, and parent diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/AnyToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/AnyToken.cs index 7280834fa5..1a09445e08 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/AnyToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/AnyToken.cs @@ -16,7 +16,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing the Any Query /// - internal sealed class AnyToken : LambdaToken + public sealed class AnyToken : LambdaToken { /// /// Create a AnyToken given the expression, parameter, and parent diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/BinaryOperatorToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/BinaryOperatorToken.cs index 6f8c8adfa5..b574f1d6af 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/BinaryOperatorToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/BinaryOperatorToken.cs @@ -15,7 +15,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a binary operator. /// - internal sealed class BinaryOperatorToken : QueryToken + public sealed class BinaryOperatorToken : QueryToken { /// /// The operator represented by this node. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/CustomQueryOptionToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/CustomQueryOptionToken.cs index 691415fc01..fac7e43d94 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/CustomQueryOptionToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/CustomQueryOptionToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a query option. /// - internal sealed class CustomQueryOptionToken : QueryToken + public sealed class CustomQueryOptionToken : QueryToken { /// /// The name of the query option. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/DottedIdentifierToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/DottedIdentifierToken.cs index 8fab312420..d2882cd2d9 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/DottedIdentifierToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/DottedIdentifierToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a type segment. /// - internal sealed class DottedIdentifierToken : PathToken + public sealed class DottedIdentifierToken : PathToken { /// /// The Identifier of the type segment. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/EndPathToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/EndPathToken.cs index f1a0d64bc6..0bd8c42ca0 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/EndPathToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/EndPathToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing the last segment in a path. /// - internal sealed class EndPathToken : PathToken + public sealed class EndPathToken : PathToken { /// /// The Identifier of the property to access. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandTermToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandTermToken.cs index bebd94f3db..e4722200fc 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandTermToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandTermToken.cs @@ -18,12 +18,12 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing an expand operation. /// - internal sealed class ExpandTermToken : QueryToken + public sealed class ExpandTermToken : QueryToken { /// /// The nav prop path for this ExpandTerm /// - private readonly PathSegmentToken pathToNavProp; + private readonly PathSegmentToken pathToNavigationProp; /// /// the filter option for this expand term @@ -73,27 +73,27 @@ internal sealed class ExpandTermToken : QueryToken /// /// Create an expand term token using only a property /// - /// the path to the navigation property - public ExpandTermToken(PathSegmentToken pathToNavProp) - : this(pathToNavProp, null, null) + /// the path to the navigation property + public ExpandTermToken(PathSegmentToken pathToNavigationProp) + : this(pathToNavigationProp, null, null) { } /// /// Create an expand term using only the property and its subexpand/select /// - /// the path to the navigation property for this expand term + /// the path to the navigation property for this expand term /// the sub select for this token /// the sub expand for this token - public ExpandTermToken(PathSegmentToken pathToNavProp, SelectToken selectOption, ExpandToken expandOption) - : this(pathToNavProp, null, null, null, null, null, null, null, selectOption, expandOption) + public ExpandTermToken(PathSegmentToken pathToNavigationProp, SelectToken selectOption, ExpandToken expandOption) + : this(pathToNavigationProp, null, null, null, null, null, null, null, selectOption, expandOption) { } /// /// Create an expand term token /// - /// the nav prop for this expand term + /// the nav prop for this expand term /// the filter option for this expand term /// the orderby options for this expand term /// the top option for this expand term @@ -103,11 +103,11 @@ public ExpandTermToken(PathSegmentToken pathToNavProp, SelectToken selectOption, /// the search option for this expand term /// the select option for this expand term /// the expand option for this expand term - public ExpandTermToken(PathSegmentToken pathToNavProp, QueryToken filterOption, IEnumerable orderByOptions, long? topOption, long? skipOption, bool? countQueryOption, long? levelsOption, QueryToken searchOption, SelectToken selectOption, ExpandToken expandOption) + public ExpandTermToken(PathSegmentToken pathToNavigationProp, QueryToken filterOption, IEnumerable orderByOptions, long? topOption, long? skipOption, bool? countQueryOption, long? levelsOption, QueryToken searchOption, SelectToken selectOption, ExpandToken expandOption) { - ExceptionUtils.CheckArgumentNotNull(pathToNavProp, "property"); + ExceptionUtils.CheckArgumentNotNull(pathToNavigationProp, "property"); - this.pathToNavProp = pathToNavProp; + this.pathToNavigationProp = pathToNavigationProp; this.filterOption = filterOption; this.orderByOptions = orderByOptions; this.topOption = topOption; @@ -122,9 +122,9 @@ public ExpandTermToken(PathSegmentToken pathToNavProp, QueryToken filterOption, /// /// the nav property for this expand term /// - public PathSegmentToken PathToNavProp + public PathSegmentToken PathToNavigationProp { - get { return this.pathToNavProp; } + get { return this.pathToNavigationProp; } } /// diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandToken.cs index 18ff4f31f9..e61eef6ccf 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/ExpandToken.cs @@ -19,7 +19,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing an expand operation. /// - internal sealed class ExpandToken : QueryToken + public sealed class ExpandToken : QueryToken { /// /// The properties according to which to expand in the results. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionCallToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionCallToken.cs index 1ffdf5ce88..d4a71c9543 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionCallToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionCallToken.cs @@ -20,7 +20,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a function call. /// - internal sealed class FunctionCallToken : QueryToken + public sealed class FunctionCallToken : QueryToken { /// /// The name of the function to call. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionParameterToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionParameterToken.cs index 95d3d8c170..c4e4040928 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionParameterToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/FunctionParameterToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// A token to represent a parameter to a function call. /// - internal sealed class FunctionParameterToken : QueryToken + public sealed class FunctionParameterToken : QueryToken { /// /// get an empty list of parameters diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/InnerPathToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/InnerPathToken.cs index 05c30de410..0adc5d2f1a 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/InnerPathToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/InnerPathToken.cs @@ -19,7 +19,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a single nonroot segment in the query path. /// - internal sealed class InnerPathToken : PathToken + public sealed class InnerPathToken : PathToken { /// /// The Identifier of the segment. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/LambdaToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/LambdaToken.cs index db6ad55ed9..8a6ddf421a 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/LambdaToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/LambdaToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing the Any/All Query /// - internal abstract class LambdaToken : QueryToken + public abstract class LambdaToken : QueryToken { /// /// The parent token. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/LiteralToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/LiteralToken.cs index f490f4cb97..16f4fd8c94 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/LiteralToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/LiteralToken.cs @@ -15,7 +15,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a literal value. /// - internal sealed class LiteralToken : QueryToken + public sealed class LiteralToken : QueryToken { /// /// The original text value of the literal. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/NonSystemToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/NonSystemToken.cs index 73f69fcba4..62a18d04e5 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/NonSystemToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/NonSystemToken.cs @@ -20,7 +20,7 @@ namespace Microsoft.OData.UriParser /// Lexical token representing a segment in a path. /// /// - internal sealed class NonSystemToken : PathSegmentToken + public sealed class NonSystemToken : PathSegmentToken { /// /// Any named values for this NonSystemToken diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/OrderByToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/OrderByToken.cs index a9a22d55e7..b41db044af 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/OrderByToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/OrderByToken.cs @@ -17,7 +17,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing an order by operation. /// - internal sealed class OrderByToken : QueryToken + public sealed class OrderByToken : QueryToken { /// /// The direction of the ordering. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathSegmentToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathSegmentToken.cs index 08f23a625e..4f24e56c6d 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathSegmentToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathSegmentToken.cs @@ -14,7 +14,7 @@ namespace Microsoft.OData.UriParser /// Lexical token representing a segment in a path. /// /// - internal abstract class PathSegmentToken + public abstract class PathSegmentToken { /// /// the next token in the path diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathToken.cs index e2babd65d5..608cc45194 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/PathToken.cs @@ -14,7 +14,7 @@ namespace Microsoft.OData.UriParser /// Lexical token representing a segment in a path. /// /// - internal abstract class PathToken : QueryToken + public abstract class PathToken : QueryToken { /// /// The NextToken in the path(can either be the parent or the child depending on whether the tree has diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryToken.cs index 035c9f5bb6..92be0b85ee 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryToken.cs @@ -20,7 +20,7 @@ namespace Microsoft.OData.UriParser /// /// Base class for all lexical tokens of OData query. /// - internal abstract class QueryToken + public abstract class QueryToken { /// /// Empty list of arguments. diff --git a/src/Microsoft.OData.Core/UriParser/TreeNodeKinds/QueryTokenKind.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryTokenKind.cs similarity index 91% rename from src/Microsoft.OData.Core/UriParser/TreeNodeKinds/QueryTokenKind.cs rename to src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryTokenKind.cs index 7690bd9b23..065955661e 100644 --- a/src/Microsoft.OData.Core/UriParser/TreeNodeKinds/QueryTokenKind.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/QueryTokenKind.cs @@ -13,7 +13,8 @@ namespace Microsoft.OData.UriParser /// /// Enumeration of kinds of query tokens. /// - internal enum QueryTokenKind + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")] + public enum QueryTokenKind { /// /// The binary operator. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/RangeVariableToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/RangeVariableToken.cs index 8930e6251f..9a1c5039bd 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/RangeVariableToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/RangeVariableToken.cs @@ -13,7 +13,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing the parameter for an Any/All query. /// - internal sealed class RangeVariableToken : QueryToken + public sealed class RangeVariableToken : QueryToken { /// /// The name of the Any/All parameter. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/SelectToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/SelectToken.cs index 3da010672f..7b0ffa2472 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/SelectToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/SelectToken.cs @@ -19,7 +19,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a select operation. /// - internal sealed class SelectToken : QueryToken + public sealed class SelectToken : QueryToken { /// /// The properties according to which to select the results. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/StarToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/StarToken.cs index 3e3e618820..ece4d1d5ea 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/StarToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/StarToken.cs @@ -16,7 +16,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing an all-properties access. /// - internal sealed class StarToken : PathToken + public sealed class StarToken : PathToken { /// /// The NextToken token to access the property on. diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/SystemToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/SystemToken.cs index 24f1c37f98..1f29f18717 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/SystemToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/SystemToken.cs @@ -19,7 +19,7 @@ namespace Microsoft.OData.UriParser /// Lexical token representing a System token such as $count /// /// - internal sealed class SystemToken : PathSegmentToken + public sealed class SystemToken : PathSegmentToken { /// /// The identifier for this SystemToken diff --git a/src/Microsoft.OData.Core/UriParser/SyntacticAst/UnaryOperatorToken.cs b/src/Microsoft.OData.Core/UriParser/SyntacticAst/UnaryOperatorToken.cs index 6c647a3163..43295a14c3 100644 --- a/src/Microsoft.OData.Core/UriParser/SyntacticAst/UnaryOperatorToken.cs +++ b/src/Microsoft.OData.Core/UriParser/SyntacticAst/UnaryOperatorToken.cs @@ -15,7 +15,7 @@ namespace Microsoft.OData.UriParser /// /// Lexical token representing a unary operator. /// - internal sealed class UnaryOperatorToken : QueryToken + public sealed class UnaryOperatorToken : QueryToken { /// /// The operator represented by this node. diff --git a/src/Microsoft.OData.Core/UriParser/Visitors/IPathSegmentTokenVisitor.cs b/src/Microsoft.OData.Core/UriParser/Visitors/IPathSegmentTokenVisitor.cs index 4dfc12724c..bad4a65fe2 100644 --- a/src/Microsoft.OData.Core/UriParser/Visitors/IPathSegmentTokenVisitor.cs +++ b/src/Microsoft.OData.Core/UriParser/Visitors/IPathSegmentTokenVisitor.cs @@ -14,7 +14,7 @@ namespace Microsoft.OData.UriParser /// Visitor interface for walking the Path Tree. /// /// Return type for the visitor methods on this visitor. - internal interface IPathSegmentTokenVisitor + public interface IPathSegmentTokenVisitor { /// /// Visit an SystemToken @@ -34,7 +34,7 @@ internal interface IPathSegmentTokenVisitor /// /// Visitor interface for walking the Path Tree. /// - internal interface IPathSegmentTokenVisitor + public interface IPathSegmentTokenVisitor { /// /// Visit an SystemToken diff --git a/src/Microsoft.OData.Core/UriParser/Visitors/ISyntacticTreeVisitor.cs b/src/Microsoft.OData.Core/UriParser/Visitors/ISyntacticTreeVisitor.cs index 13cb969efa..a149f90ad0 100644 --- a/src/Microsoft.OData.Core/UriParser/Visitors/ISyntacticTreeVisitor.cs +++ b/src/Microsoft.OData.Core/UriParser/Visitors/ISyntacticTreeVisitor.cs @@ -16,7 +16,7 @@ namespace Microsoft.OData.UriParser /// Visitor interface for walking the Syntactic Tree. /// /// Return type for the visitor methods on this visitor. - internal interface ISyntacticTreeVisitor + public interface ISyntacticTreeVisitor { /// /// Visit an AllToken diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Binders/ExpandTreeNormalizerTests.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Binders/ExpandTreeNormalizerTests.cs index b085bdfc65..1e2d97828e 100644 --- a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Binders/ExpandTreeNormalizerTests.cs +++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Binders/ExpandTreeNormalizerTests.cs @@ -38,7 +38,7 @@ public void NormalizeTreeWorksWhenPathsHaveArguments() ExpandTreeNormalizer expandTreeNormalizer = new ExpandTreeNormalizer(); ExpandToken normalizedExpand = expandTreeNormalizer.NormalizeExpandTree(expand); normalizedExpand.ExpandTerms.Single().ShouldBeExpandTermToken("1", true) - .And.PathToNavProp.As().NamedValues.Single().ShouldBeNamedValue("name", "value"); + .And.PathToNavigationProp.As().NamedValues.Single().ShouldBeNamedValue("name", "value"); normalizedExpand.ExpandTerms.Single().ExpandOption.Should().BeNull(); } @@ -65,8 +65,8 @@ public void CombineTermsWorksForMultipleTerms() ExpandTreeNormalizer expandTreeNormalizer = new ExpandTreeNormalizer(); ExpandToken combinedExpand = expandTreeNormalizer.CombineTerms(expand); combinedExpand.ExpandTerms.Single().ShouldBeExpandTermToken("1", true); - combinedExpand.ExpandTerms.ElementAt(0).ExpandOption.ExpandTerms.Should().Contain(t => t.PathToNavProp == token2); - combinedExpand.ExpandTerms.ElementAt(0).ExpandOption.ExpandTerms.Should().Contain(t => t.PathToNavProp == token3); + combinedExpand.ExpandTerms.ElementAt(0).ExpandOption.ExpandTerms.Should().Contain(t => t.PathToNavigationProp == token2); + combinedExpand.ExpandTerms.ElementAt(0).ExpandOption.ExpandTerms.Should().Contain(t => t.PathToNavigationProp == token3); } [Fact] @@ -77,7 +77,7 @@ public void InvertPathsActuallyInvertsPaths() ExpandTreeNormalizer expandTreeNormalizer = new ExpandTreeNormalizer(); ExpandToken invertedPaths = expandTreeNormalizer.NormalizePaths(expand); invertedPaths.ExpandTerms.Single().ShouldBeExpandTermToken("1", false) - .And.PathToNavProp.NextToken.ShouldBeNonSystemToken("2"); + .And.PathToNavigationProp.NextToken.ShouldBeNonSystemToken("2"); } [Fact] @@ -196,10 +196,10 @@ public void AddTermsWorksForNestedMultipleTerms() ExpandTreeNormalizer expandTreeNormalizer = new ExpandTreeNormalizer(); var addedToken = expandTreeNormalizer.CombineTerms(outerExpandTerm1, outerExpandTerm2); addedToken.ShouldBeExpandTermToken("1", true).And.ExpandOption.ExpandTerms.Should().Contain(innerExpandTerm2); - ExpandTermToken twoToken = addedToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavProp.Identifier == "2"); + ExpandTermToken twoToken = addedToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavigationProp.Identifier == "2"); twoToken.ShouldBeExpandTermToken("2", true); - ExpandTermToken fiveToken = twoToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavProp.Identifier == "5"); - ExpandTermToken zeroToken = twoToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavProp.Identifier == "0"); + ExpandTermToken fiveToken = twoToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavigationProp.Identifier == "5"); + ExpandTermToken zeroToken = twoToken.ExpandOption.ExpandTerms.FirstOrDefault(x => x.PathToNavigationProp.Identifier == "0"); fiveToken.ShouldBeExpandTermToken("5", true); zeroToken.ShouldBeExpandTermToken("0", true); } diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/ExpandOptionParserTests.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/ExpandOptionParserTests.cs index 07fb902408..13350abbde 100644 --- a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/ExpandOptionParserTests.cs +++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/ExpandOptionParserTests.cs @@ -26,7 +26,7 @@ public void ExpandTermTokenPathIsSet() ExpandOptionParser optionParser = new ExpandOptionParser(5); var termToken = optionParser.BuildExpandTermToken(pathToken, ""); - termToken.ElementAt(0).PathToNavProp.Should().Be(pathToken); + termToken.ElementAt(0).PathToNavigationProp.Should().Be(pathToken); } [Fact] @@ -116,7 +116,7 @@ public void NestedExpandsAreAllowed() { var result = this.ParseExpandOptions("($expand=two)"); ExpandTermToken two = result.ExpandOption.ExpandTerms.Single(); - two.PathToNavProp.ShouldBeNonSystemToken("two"); + two.PathToNavigationProp.ShouldBeNonSystemToken("two"); } [Fact] @@ -124,9 +124,9 @@ public void DeepNestedExpandsAreAllowed() { var result = this.ParseExpandOptions("($expand=two($expand=three))"); ExpandTermToken two = result.ExpandOption.ExpandTerms.Single(); - two.PathToNavProp.ShouldBeNonSystemToken("two"); + two.PathToNavigationProp.ShouldBeNonSystemToken("two"); ExpandTermToken three = two.ExpandOption.ExpandTerms.Single(); - three.PathToNavProp.ShouldBeNonSystemToken("three"); + three.PathToNavigationProp.ShouldBeNonSystemToken("three"); } [Fact] @@ -134,9 +134,9 @@ public void DeepNestedExpandsWithSemisAreAllowed() { var result = this.ParseExpandOptions("($expand=two($expand=three;);)"); ExpandTermToken two = result.ExpandOption.ExpandTerms.Single(); - two.PathToNavProp.ShouldBeNonSystemToken("two"); + two.PathToNavigationProp.ShouldBeNonSystemToken("two"); ExpandTermToken three = two.ExpandOption.ExpandTerms.Single(); - three.PathToNavProp.ShouldBeNonSystemToken("three"); + three.PathToNavigationProp.ShouldBeNonSystemToken("three"); } [Fact(Skip = "This test currently fails.")] diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/SelectExpandParserTests.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/SelectExpandParserTests.cs index 50b40357b4..d22701db5d 100644 --- a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/SelectExpandParserTests.cs +++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/Parsers/SelectExpandParserTests.cs @@ -217,8 +217,8 @@ public void ParseStarWithEntitySetInExpand() { var results = this.StarExpandTesting("*/$ref,CityHall", "Cities"); results.ExpandTerms.Should().HaveCount(3); - results.ExpandTerms.First().PathToNavProp.Identifier.ShouldBeEquivalentTo("CityHall"); - results.ExpandTerms.Last().PathToNavProp.Identifier.ShouldBeEquivalentTo("$ref"); + results.ExpandTerms.First().PathToNavigationProp.Identifier.ShouldBeEquivalentTo("CityHall"); + results.ExpandTerms.Last().PathToNavigationProp.Identifier.ShouldBeEquivalentTo("$ref"); } [Fact] @@ -226,8 +226,8 @@ public void ParseStarWithMultipleEntitySetInExpand() { var results = this.StarExpandTesting("CityHall($levels=2),*/$ref,PoliceStation($select=Id, Address)", "Cities"); results.ExpandTerms.Should().HaveCount(3); - results.ExpandTerms.First().PathToNavProp.Identifier.ShouldBeEquivalentTo("CityHall"); - results.ExpandTerms.Last().PathToNavProp.Identifier.ShouldBeEquivalentTo("$ref"); + results.ExpandTerms.First().PathToNavigationProp.Identifier.ShouldBeEquivalentTo("CityHall"); + results.ExpandTerms.Last().PathToNavigationProp.Identifier.ShouldBeEquivalentTo("$ref"); } [Fact] diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/SyntacticAst/ExpandTermTokenTests.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/SyntacticAst/ExpandTermTokenTests.cs index a1ade053c8..9761912460 100644 --- a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/SyntacticAst/ExpandTermTokenTests.cs +++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/SyntacticAst/ExpandTermTokenTests.cs @@ -58,10 +58,10 @@ public void PropertySetCorrectly() ExpandTermToken expandTerm1 = new ExpandTermToken(new NonSystemToken("stuff", null, null), null /*selectOption*/, null /*expandOption*/); - expandTerm1.PathToNavProp.ShouldBeNonSystemToken("stuff"); + expandTerm1.PathToNavigationProp.ShouldBeNonSystemToken("stuff"); ExpandTermToken expandTerm2 = new ExpandTermToken(new NonSystemToken("stuff", null, null)); - expandTerm2.PathToNavProp.ShouldBeNonSystemToken("stuff"); + expandTerm2.PathToNavigationProp.ShouldBeNonSystemToken("stuff"); } [Fact] diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/TokenAssertions.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/TokenAssertions.cs index 69ab16bb7c..a715aba389 100644 --- a/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/TokenAssertions.cs +++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/UriParser/TokenAssertions.cs @@ -126,10 +126,10 @@ public static AndConstraint ShouldBeExpandTermToken(this QueryT token.Should().BeOfType(); ExpandTermToken expandTermToken = token.As(); expandTermToken.Kind.Should().Be(QueryTokenKind.ExpandTerm); - expandTermToken.PathToNavProp.Identifier.Should().Be(propertyName); + expandTermToken.PathToNavigationProp.Identifier.Should().Be(propertyName); if (checkNullParent) { - expandTermToken.PathToNavProp.NextToken.Should().BeNull(); + expandTermToken.PathToNavigationProp.NextToken.Should().BeNull(); } return new AndConstraint(expandTermToken); } diff --git a/test/FunctionalTests/Tests/DataOData/Tests/OData.Common.Tests/PublicApi/PublicApi.bsl b/test/FunctionalTests/Tests/DataOData/Tests/OData.Common.Tests/PublicApi/PublicApi.bsl index ff2877e7d5..7591e2a5f4 100644 --- a/test/FunctionalTests/Tests/DataOData/Tests/OData.Common.Tests/PublicApi/PublicApi.bsl +++ b/test/FunctionalTests/Tests/DataOData/Tests/OData.Common.Tests/PublicApi/PublicApi.bsl @@ -5166,11 +5166,71 @@ public enum Microsoft.OData.UriParser.QueryNodeKind : int { UnaryOperator = 5 } +public enum Microsoft.OData.UriParser.QueryTokenKind : int { + Aggregate = 24 + AggregateExpression = 25 + AggregateGroupBy = 26 + All = 19 + Any = 15 + BinaryOperator = 3 + CustomQueryOption = 9 + DottedIdentifier = 17 + EndPath = 7 + Expand = 13 + ExpandTerm = 20 + FunctionCall = 6 + FunctionParameter = 21 + FunctionParameterAlias = 22 + InnerPath = 16 + Literal = 5 + OrderBy = 8 + RangeVariable = 18 + Select = 10 + Star = 11 + StringLiteral = 23 + TypeSegment = 14 + UnaryOperator = 4 +} + public enum Microsoft.OData.UriParser.UnaryOperatorKind : int { Negate = 0 Not = 1 } +public interface Microsoft.OData.UriParser.IPathSegmentTokenVisitor { + void Visit (Microsoft.OData.UriParser.NonSystemToken tokenIn) + void Visit (Microsoft.OData.UriParser.SystemToken tokenIn) +} + +public interface Microsoft.OData.UriParser.IPathSegmentTokenVisitor`1 { + T Visit (Microsoft.OData.UriParser.NonSystemToken tokenIn) + T Visit (Microsoft.OData.UriParser.SystemToken tokenIn) +} + +public interface Microsoft.OData.UriParser.ISyntacticTreeVisitor`1 { + T Visit (Microsoft.OData.UriParser.Aggregation.AggregateExpressionToken tokenIn) + T Visit (Microsoft.OData.UriParser.Aggregation.AggregateToken tokenIn) + T Visit (Microsoft.OData.UriParser.Aggregation.GroupByToken tokenIn) + T Visit (Microsoft.OData.UriParser.AllToken tokenIn) + T Visit (Microsoft.OData.UriParser.AnyToken tokenIn) + T Visit (Microsoft.OData.UriParser.BinaryOperatorToken tokenIn) + T Visit (Microsoft.OData.UriParser.CustomQueryOptionToken tokenIn) + T Visit (Microsoft.OData.UriParser.DottedIdentifierToken tokenIn) + T Visit (Microsoft.OData.UriParser.EndPathToken tokenIn) + T Visit (Microsoft.OData.UriParser.ExpandTermToken tokenIn) + T Visit (Microsoft.OData.UriParser.ExpandToken tokenIn) + T Visit (Microsoft.OData.UriParser.FunctionCallToken tokenIn) + T Visit (Microsoft.OData.UriParser.FunctionParameterToken tokenIn) + T Visit (Microsoft.OData.UriParser.InnerPathToken tokenIn) + T Visit (Microsoft.OData.UriParser.LambdaToken tokenIn) + T Visit (Microsoft.OData.UriParser.LiteralToken tokenIn) + T Visit (Microsoft.OData.UriParser.OrderByToken tokenIn) + T Visit (Microsoft.OData.UriParser.RangeVariableToken tokenIn) + T Visit (Microsoft.OData.UriParser.SelectToken tokenIn) + T Visit (Microsoft.OData.UriParser.StarToken tokenIn) + T Visit (Microsoft.OData.UriParser.UnaryOperatorToken tokenIn) +} + public interface Microsoft.OData.UriParser.IUriLiteralParser { object ParseUriStringToType (string text, Microsoft.OData.Edm.IEdmTypeReference targetType, out Microsoft.OData.UriParser.UriLiteralParsingException& parsingException) } @@ -5200,6 +5260,16 @@ public abstract class Microsoft.OData.UriParser.LambdaNode : Microsoft.OData.Uri Microsoft.OData.UriParser.CollectionNode Source { public get; public set; } } +public abstract class Microsoft.OData.UriParser.LambdaToken : Microsoft.OData.UriParser.QueryToken { + protected LambdaToken (Microsoft.OData.UriParser.QueryToken expression, string parameter, Microsoft.OData.UriParser.QueryToken parent) + + Microsoft.OData.UriParser.QueryToken Expression { public get; } + string Parameter { public get; } + Microsoft.OData.UriParser.QueryToken Parent { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public abstract class Microsoft.OData.UriParser.ODataPathSegment { protected ODataPathSegment () @@ -5233,6 +5303,18 @@ public abstract class Microsoft.OData.UriParser.PathSegmentHandler { public virtual void Handle (Microsoft.OData.UriParser.ValueSegment segment) } +public abstract class Microsoft.OData.UriParser.PathSegmentToken { + protected PathSegmentToken (Microsoft.OData.UriParser.PathSegmentToken nextToken) + + string Identifier { public abstract get; } + bool IsStructuralProperty { public get; public set; } + Microsoft.OData.UriParser.PathSegmentToken NextToken { public get; } + + public abstract T Accept (IPathSegmentTokenVisitor`1 visitor) + public abstract void Accept (Microsoft.OData.UriParser.IPathSegmentTokenVisitor visitor) + public abstract bool IsNamespaceOrContainerQualified () +} + public abstract class Microsoft.OData.UriParser.PathSegmentTranslator`1 { protected PathSegmentTranslator`1 () @@ -5254,6 +5336,13 @@ public abstract class Microsoft.OData.UriParser.PathSegmentTranslator`1 { public virtual T Translate (Microsoft.OData.UriParser.ValueSegment segment) } +public abstract class Microsoft.OData.UriParser.PathToken : Microsoft.OData.UriParser.QueryToken { + protected PathToken () + + string Identifier { public abstract get; } + Microsoft.OData.UriParser.QueryToken NextToken { public abstract get; public abstract set; } +} + public abstract class Microsoft.OData.UriParser.QueryNode { protected QueryNode () @@ -5293,6 +5382,16 @@ public abstract class Microsoft.OData.UriParser.QueryNodeVisitor`1 { public virtual T Visit (Microsoft.OData.UriParser.UnaryOperatorNode nodeIn) } +public abstract class Microsoft.OData.UriParser.QueryToken { + public static readonly Microsoft.OData.UriParser.QueryToken[] EmptyTokens = Microsoft.OData.UriParser.QueryToken[] + + protected QueryToken () + + Microsoft.OData.UriParser.QueryTokenKind Kind { public abstract get; } + + public abstract T Accept (ISyntacticTreeVisitor`1 visitor) +} + public abstract class Microsoft.OData.UriParser.RangeVariable { protected RangeVariable () @@ -5525,6 +5624,14 @@ public sealed class Microsoft.OData.UriParser.AllNode : Microsoft.OData.UriParse public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.AllToken : Microsoft.OData.UriParser.LambdaToken { + public AllToken (Microsoft.OData.UriParser.QueryToken expression, string parameter, Microsoft.OData.UriParser.QueryToken parent) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.AlternateKeysODataUriResolver : Microsoft.OData.UriParser.ODataUriResolver { public AlternateKeysODataUriResolver (Microsoft.OData.Edm.IEdmModel model) @@ -5540,6 +5647,14 @@ public sealed class Microsoft.OData.UriParser.AnyNode : Microsoft.OData.UriParse public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.AnyToken : Microsoft.OData.UriParser.LambdaToken { + public AnyToken (Microsoft.OData.UriParser.QueryToken expression, string parameter, Microsoft.OData.UriParser.QueryToken parent) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.BatchReferenceSegment : Microsoft.OData.UriParser.ODataPathSegment { public BatchReferenceSegment (string contentId, Microsoft.OData.Edm.IEdmType edmType, Microsoft.OData.Edm.IEdmEntitySetBase entitySet) @@ -5571,6 +5686,17 @@ public sealed class Microsoft.OData.UriParser.BinaryOperatorNode : Microsoft.ODa public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.BinaryOperatorToken : Microsoft.OData.UriParser.QueryToken { + public BinaryOperatorToken (Microsoft.OData.UriParser.BinaryOperatorKind operatorKind, Microsoft.OData.UriParser.QueryToken left, Microsoft.OData.UriParser.QueryToken right) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.QueryToken Left { public get; } + Microsoft.OData.UriParser.BinaryOperatorKind OperatorKind { public get; } + Microsoft.OData.UriParser.QueryToken Right { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.CollectionFunctionCallNode : Microsoft.OData.UriParser.CollectionNode { public CollectionFunctionCallNode (string name, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Edm.IEdmFunction]] functions, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.QueryNode]] parameters, Microsoft.OData.Edm.IEdmCollectionTypeReference returnedCollectionType, Microsoft.OData.UriParser.QueryNode source) @@ -5695,6 +5821,16 @@ public sealed class Microsoft.OData.UriParser.CountVirtualPropertyNode : Microso Microsoft.OData.Edm.IEdmTypeReference TypeReference { public virtual get; } } +public sealed class Microsoft.OData.UriParser.CustomQueryOptionToken : Microsoft.OData.UriParser.QueryToken { + public CustomQueryOptionToken (string name, string value) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + string Value { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.CustomUriLiteralParsers : IUriLiteralParser { public static void AddCustomUriLiteralParser (Microsoft.OData.UriParser.IUriLiteralParser customUriLiteralParser) public static void AddCustomUriLiteralParser (Microsoft.OData.Edm.IEdmTypeReference edmTypeReference, Microsoft.OData.UriParser.IUriLiteralParser customUriLiteralParser) @@ -5702,6 +5838,16 @@ public sealed class Microsoft.OData.UriParser.CustomUriLiteralParsers : IUriLite public static bool RemoveCustomUriLiteralParser (Microsoft.OData.UriParser.IUriLiteralParser customUriLiteralParser) } +public sealed class Microsoft.OData.UriParser.DottedIdentifierToken : Microsoft.OData.UriParser.PathToken { + public DottedIdentifierToken (string identifier, Microsoft.OData.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.DynamicPathSegment : Microsoft.OData.UriParser.ODataPathSegment { public DynamicPathSegment (string identifier) public DynamicPathSegment (string identifier, Microsoft.OData.Edm.IEdmType edmType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource, bool singleResult) @@ -5712,6 +5858,16 @@ public sealed class Microsoft.OData.UriParser.DynamicPathSegment : Microsoft.ODa public virtual T TranslateWith (PathSegmentTranslator`1 translator) } +public sealed class Microsoft.OData.UriParser.EndPathToken : Microsoft.OData.UriParser.PathToken { + public EndPathToken (string identifier, Microsoft.OData.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.EntityIdSegment { System.Uri Id { public get; } } @@ -5737,6 +5893,35 @@ public sealed class Microsoft.OData.UriParser.ExpandedNavigationSelectItem : Mic public virtual T TranslateWith (SelectItemTranslator`1 translator) } +public sealed class Microsoft.OData.UriParser.ExpandTermToken : Microsoft.OData.UriParser.QueryToken { + public ExpandTermToken (Microsoft.OData.UriParser.PathSegmentToken pathToNavigationProp) + public ExpandTermToken (Microsoft.OData.UriParser.PathSegmentToken pathToNavigationProp, Microsoft.OData.UriParser.SelectToken selectOption, Microsoft.OData.UriParser.ExpandToken expandOption) + public ExpandTermToken (Microsoft.OData.UriParser.PathSegmentToken pathToNavigationProp, Microsoft.OData.UriParser.QueryToken filterOption, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.OrderByToken]] orderByOptions, System.Nullable`1[[System.Int64]] topOption, System.Nullable`1[[System.Int64]] skipOption, System.Nullable`1[[System.Boolean]] countQueryOption, System.Nullable`1[[System.Int64]] levelsOption, Microsoft.OData.UriParser.QueryToken searchOption, Microsoft.OData.UriParser.SelectToken selectOption, Microsoft.OData.UriParser.ExpandToken expandOption) + + System.Nullable`1[[System.Boolean]] CountQueryOption { public get; } + Microsoft.OData.UriParser.ExpandToken ExpandOption { public get; } + Microsoft.OData.UriParser.QueryToken FilterOption { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + System.Nullable`1[[System.Int64]] LevelsOption { public get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.OrderByToken]] OrderByOptions { public get; } + Microsoft.OData.UriParser.PathSegmentToken PathToNavigationProp { public get; } + Microsoft.OData.UriParser.QueryToken SearchOption { public get; } + Microsoft.OData.UriParser.SelectToken SelectOption { public get; } + System.Nullable`1[[System.Int64]] SkipOption { public get; } + System.Nullable`1[[System.Int64]] TopOption { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.UriParser.ExpandToken : Microsoft.OData.UriParser.QueryToken { + public ExpandToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.ExpandTermToken]] expandTerms) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.ExpandTermToken]] ExpandTerms { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.FilterClause { public FilterClause (Microsoft.OData.UriParser.SingleValueNode expression, Microsoft.OData.UriParser.RangeVariable rangeVariable) @@ -5745,6 +5930,30 @@ public sealed class Microsoft.OData.UriParser.FilterClause { Microsoft.OData.UriParser.RangeVariable RangeVariable { public get; } } +public sealed class Microsoft.OData.UriParser.FunctionCallToken : Microsoft.OData.UriParser.QueryToken { + public FunctionCallToken (string name, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.QueryToken]] argumentValues) + public FunctionCallToken (string name, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.FunctionParameterToken]] arguments, Microsoft.OData.UriParser.QueryToken source) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.FunctionParameterToken]] Arguments { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + Microsoft.OData.UriParser.QueryToken Source { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.UriParser.FunctionParameterToken : Microsoft.OData.UriParser.QueryToken { + public static Microsoft.OData.UriParser.FunctionParameterToken[] EmptyParameterList = Microsoft.OData.UriParser.FunctionParameterToken[] + + public FunctionParameterToken (string parameterName, Microsoft.OData.UriParser.QueryToken valueToken) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + string ParameterName { public get; } + Microsoft.OData.UriParser.QueryToken ValueToken { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.FunctionSignatureWithReturnType { public FunctionSignatureWithReturnType (Microsoft.OData.Edm.IEdmTypeReference returnType, Microsoft.OData.Edm.IEdmTypeReference[] argumentTypes) @@ -5752,6 +5961,17 @@ public sealed class Microsoft.OData.UriParser.FunctionSignatureWithReturnType { Microsoft.OData.Edm.IEdmTypeReference ReturnType { public get; } } +public sealed class Microsoft.OData.UriParser.InnerPathToken : Microsoft.OData.UriParser.PathToken { + public InnerPathToken (string identifier, Microsoft.OData.UriParser.QueryToken nextToken, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.NamedValue]] namedValues) + + string Identifier { public virtual get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.NamedValue]] NamedValues { public get; } + Microsoft.OData.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.KeySegment : Microsoft.OData.UriParser.ODataPathSegment { public KeySegment (System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String],[System.Object]]]] keys, Microsoft.OData.Edm.IEdmEntityType edmType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource) public KeySegment (Microsoft.OData.UriParser.ODataPathSegment previous, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String],[System.Object]]]] keys, Microsoft.OData.Edm.IEdmEntityType edmType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource) @@ -5771,6 +5991,15 @@ public sealed class Microsoft.OData.UriParser.LevelsClause { long Level { public get; } } +public sealed class Microsoft.OData.UriParser.LiteralToken : Microsoft.OData.UriParser.QueryToken { + public LiteralToken (object value) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + object Value { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.MetadataSegment : Microsoft.OData.UriParser.ODataPathSegment { public static readonly Microsoft.OData.UriParser.MetadataSegment Instance = Microsoft.OData.UriParser.MetadataSegment @@ -5780,6 +6009,13 @@ public sealed class Microsoft.OData.UriParser.MetadataSegment : Microsoft.OData. public virtual T TranslateWith (PathSegmentTranslator`1 translator) } +public sealed class Microsoft.OData.UriParser.NamedValue { + public NamedValue (string name, Microsoft.OData.UriParser.LiteralToken value) + + string Name { public get; } + Microsoft.OData.UriParser.LiteralToken Value { public get; } +} + public sealed class Microsoft.OData.UriParser.NamespaceQualifiedWildcardSelectItem : Microsoft.OData.UriParser.SelectItem { public NamespaceQualifiedWildcardSelectItem (string namespaceName) @@ -5830,6 +6066,17 @@ public sealed class Microsoft.OData.UriParser.NonResourceRangeVariableReferenceN public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.NonSystemToken : Microsoft.OData.UriParser.PathSegmentToken { + public NonSystemToken (string identifier, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.NamedValue]] namedValues, Microsoft.OData.UriParser.PathSegmentToken nextToken) + + string Identifier { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.NamedValue]] NamedValues { public get; } + + public virtual T Accept (IPathSegmentTokenVisitor`1 visitor) + public virtual void Accept (Microsoft.OData.UriParser.IPathSegmentTokenVisitor visitor) + public virtual bool IsNamespaceOrContainerQualified () +} + [ DebuggerDisplayAttribute(), ] @@ -5931,6 +6178,16 @@ public sealed class Microsoft.OData.UriParser.OrderByClause { Microsoft.OData.UriParser.OrderByClause ThenBy { public get; } } +public sealed class Microsoft.OData.UriParser.OrderByToken : Microsoft.OData.UriParser.QueryToken { + public OrderByToken (Microsoft.OData.UriParser.QueryToken expression, Microsoft.OData.UriParser.OrderByDirection direction) + + Microsoft.OData.UriParser.OrderByDirection Direction { public get; } + Microsoft.OData.UriParser.QueryToken Expression { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.ParseDynamicPathSegment : System.MulticastDelegate, ICloneable, ISerializable { public ParseDynamicPathSegment (object object, System.IntPtr method) @@ -5968,6 +6225,15 @@ public sealed class Microsoft.OData.UriParser.PropertySegment : Microsoft.OData. public virtual T TranslateWith (PathSegmentTranslator`1 translator) } +public sealed class Microsoft.OData.UriParser.RangeVariableToken : Microsoft.OData.UriParser.QueryToken { + public RangeVariableToken (string name) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.ResourceRangeVariable : Microsoft.OData.UriParser.RangeVariable { public ResourceRangeVariable (string name, Microsoft.OData.Edm.IEdmStructuredTypeReference structuredType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource) public ResourceRangeVariable (string name, Microsoft.OData.Edm.IEdmStructuredTypeReference structuredType, Microsoft.OData.UriParser.CollectionResourceNode collectionResourceNode) @@ -6014,6 +6280,15 @@ public sealed class Microsoft.OData.UriParser.SelectExpandClause { System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.SelectItem]] SelectedItems { public get; } } +public sealed class Microsoft.OData.UriParser.SelectToken : Microsoft.OData.UriParser.QueryToken { + public SelectToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.PathSegmentToken]] properties) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.PathSegmentToken]] Properties { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.SingleNavigationNode : Microsoft.OData.UriParser.SingleEntityNode { public SingleNavigationNode (Microsoft.OData.UriParser.SingleResourceNode source, Microsoft.OData.Edm.IEdmNavigationProperty navigationProperty, Microsoft.OData.Edm.IEdmPathExpression bindingPath) @@ -6098,6 +6373,16 @@ public sealed class Microsoft.OData.UriParser.SingleValuePropertyAccessNode : Mi public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.StarToken : Microsoft.OData.UriParser.PathToken { + public StarToken (Microsoft.OData.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.StringAsEnumResolver : Microsoft.OData.UriParser.ODataUriResolver { public StringAsEnumResolver () @@ -6107,6 +6392,16 @@ public sealed class Microsoft.OData.UriParser.StringAsEnumResolver : Microsoft.O public virtual System.Collections.Generic.IDictionary`2[[Microsoft.OData.Edm.IEdmOperationParameter],[Microsoft.OData.UriParser.SingleValueNode]] ResolveOperationParameters (Microsoft.OData.Edm.IEdmOperation operation, System.Collections.Generic.IDictionary`2[[System.String],[Microsoft.OData.UriParser.SingleValueNode]] input) } +public sealed class Microsoft.OData.UriParser.SystemToken : Microsoft.OData.UriParser.PathSegmentToken { + public SystemToken (string identifier, Microsoft.OData.UriParser.PathSegmentToken nextToken) + + string Identifier { public virtual get; } + + public virtual T Accept (IPathSegmentTokenVisitor`1 visitor) + public virtual void Accept (Microsoft.OData.UriParser.IPathSegmentTokenVisitor visitor) + public virtual bool IsNamespaceOrContainerQualified () +} + public sealed class Microsoft.OData.UriParser.TypeSegment : Microsoft.OData.UriParser.ODataPathSegment { public TypeSegment (Microsoft.OData.Edm.IEdmType actualType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource) public TypeSegment (Microsoft.OData.Edm.IEdmType actualType, Microsoft.OData.Edm.IEdmType expectedType, Microsoft.OData.Edm.IEdmNavigationSource navigationSource) @@ -6128,6 +6423,16 @@ public sealed class Microsoft.OData.UriParser.UnaryOperatorNode : Microsoft.ODat public virtual T Accept (QueryNodeVisitor`1 visitor) } +public sealed class Microsoft.OData.UriParser.UnaryOperatorToken : Microsoft.OData.UriParser.QueryToken { + public UnaryOperatorToken (Microsoft.OData.UriParser.UnaryOperatorKind operatorKind, Microsoft.OData.UriParser.QueryToken operand) + + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.QueryToken Operand { public get; } + Microsoft.OData.UriParser.UnaryOperatorKind OperatorKind { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + [ DebuggerDisplayAttribute(), ] @@ -6137,6 +6442,12 @@ public sealed class Microsoft.OData.UriParser.UriLiteralParsingException : Micro public UriLiteralParsingException (string message, System.Exception innerException) } +public sealed class Microsoft.OData.UriParser.UriQueryExpressionParser { + public UriQueryExpressionParser (int maxDepth) + + public Microsoft.OData.UriParser.QueryToken ParseFilter (string filter) +} + public sealed class Microsoft.OData.UriParser.UriTemplateExpression { public UriTemplateExpression () @@ -6176,6 +6487,10 @@ public enum Microsoft.OData.UriParser.Aggregation.TransformationNodeKind : int { GroupBy = 1 } +public abstract class Microsoft.OData.UriParser.Aggregation.ApplyTransformationToken : Microsoft.OData.UriParser.QueryToken { + protected ApplyTransformationToken () +} + public abstract class Microsoft.OData.UriParser.Aggregation.TransformationNode { protected TransformationNode () @@ -6193,6 +6508,28 @@ public sealed class Microsoft.OData.UriParser.Aggregation.AggregateExpression { Microsoft.OData.Edm.IEdmTypeReference TypeReference { public get; } } +public sealed class Microsoft.OData.UriParser.Aggregation.AggregateExpressionToken : Microsoft.OData.UriParser.QueryToken { + public AggregateExpressionToken (Microsoft.OData.UriParser.QueryToken expression, Microsoft.OData.UriParser.Aggregation.AggregationMethod method, string alias) + public AggregateExpressionToken (Microsoft.OData.UriParser.QueryToken expression, Microsoft.OData.UriParser.Aggregation.AggregationMethodDefinition methodDefinition, string alias) + + string Alias { public get; } + Microsoft.OData.UriParser.QueryToken Expression { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.Aggregation.AggregationMethod Method { public get; } + Microsoft.OData.UriParser.Aggregation.AggregationMethodDefinition MethodDefinition { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.UriParser.Aggregation.AggregateToken : Microsoft.OData.UriParser.Aggregation.ApplyTransformationToken { + public AggregateToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.Aggregation.AggregateExpressionToken]] expressions) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.Aggregation.AggregateExpressionToken]] Expressions { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.Aggregation.AggregateTransformationNode : Microsoft.OData.UriParser.Aggregation.TransformationNode { public AggregateTransformationNode (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.Aggregation.AggregateExpression]] expressions) @@ -6237,6 +6574,16 @@ public sealed class Microsoft.OData.UriParser.Aggregation.GroupByPropertyNode { Microsoft.OData.Edm.IEdmTypeReference TypeReference { public get; } } +public sealed class Microsoft.OData.UriParser.Aggregation.GroupByToken : Microsoft.OData.UriParser.Aggregation.ApplyTransformationToken { + public GroupByToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.EndPathToken]] properties, Microsoft.OData.UriParser.Aggregation.ApplyTransformationToken child) + + Microsoft.OData.UriParser.Aggregation.ApplyTransformationToken Child { public get; } + Microsoft.OData.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.UriParser.EndPathToken]] Properties { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + public sealed class Microsoft.OData.UriParser.Aggregation.GroupByTransformationNode : Microsoft.OData.UriParser.Aggregation.TransformationNode { public GroupByTransformationNode (System.Collections.Generic.IList`1[[Microsoft.OData.UriParser.Aggregation.GroupByPropertyNode]] groupingProperties, Microsoft.OData.UriParser.Aggregation.TransformationNode childTransformations, Microsoft.OData.UriParser.CollectionNode source) @@ -7121,3 +7468,344 @@ public sealed class Microsoft.OData.Client.WritingNestedResourceInfoArgs { object Target { public get; } } +public enum Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind : int { + Aggregate = 24 + AggregateExpression = 25 + AggregateGroupBy = 26 + All = 19 + Any = 15 + BinaryOperator = 3 + CustomQueryOption = 9 + DottedIdentifier = 17 + EndPath = 7 + Expand = 13 + ExpandTerm = 20 + FunctionCall = 6 + FunctionParameter = 21 + FunctionParameterAlias = 22 + InnerPath = 16 + Literal = 5 + OrderBy = 8 + RangeVariable = 18 + Select = 10 + Star = 11 + StringLiteral = 23 + TypeSegment = 14 + UnaryOperator = 4 +} + +public interface Microsoft.OData.Client.ALinq.UriParser.IPathSegmentTokenVisitor { + void Visit (Microsoft.OData.Client.ALinq.UriParser.NonSystemToken tokenIn) + void Visit (Microsoft.OData.Client.ALinq.UriParser.SystemToken tokenIn) +} + +public interface Microsoft.OData.Client.ALinq.UriParser.IPathSegmentTokenVisitor`1 { + T Visit (Microsoft.OData.Client.ALinq.UriParser.NonSystemToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.SystemToken tokenIn) +} + +public interface Microsoft.OData.Client.ALinq.UriParser.ISyntacticTreeVisitor`1 { + T Visit (Microsoft.OData.Client.ALinq.UriParser.AggregateExpressionToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.AggregateToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.AllToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.AnyToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.BinaryOperatorToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.CustomQueryOptionToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.DottedIdentifierToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.EndPathToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.ExpandTermToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.ExpandToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.FunctionCallToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.GroupByToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.InnerPathToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.LambdaToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.LiteralToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.OrderByToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.RangeVariableToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.SelectToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.StarToken tokenIn) + T Visit (Microsoft.OData.Client.ALinq.UriParser.UnaryOperatorToken tokenIn) +} + +public abstract class Microsoft.OData.Client.ALinq.UriParser.ApplyTransformationToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + protected ApplyTransformationToken () +} + +public abstract class Microsoft.OData.Client.ALinq.UriParser.LambdaToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + protected LambdaToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, string parameter, Microsoft.OData.Client.ALinq.UriParser.QueryToken parent) + + Microsoft.OData.Client.ALinq.UriParser.QueryToken Expression { public get; } + string Parameter { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Parent { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public abstract class Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken { + protected PathSegmentToken (Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken nextToken) + + string Identifier { public abstract get; } + bool IsStructuralProperty { public get; public set; } + Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken NextToken { public get; } + + public abstract T Accept (IPathSegmentTokenVisitor`1 visitor) + public abstract void Accept (Microsoft.OData.Client.ALinq.UriParser.IPathSegmentTokenVisitor visitor) + public abstract bool IsNamespaceOrContainerQualified () +} + +public abstract class Microsoft.OData.Client.ALinq.UriParser.PathToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + protected PathToken () + + string Identifier { public abstract get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken NextToken { public abstract get; public abstract set; } +} + +public abstract class Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public static readonly Microsoft.OData.Client.ALinq.UriParser.QueryToken[] EmptyTokens = Microsoft.OData.Client.ALinq.UriParser.QueryToken[] + + protected QueryToken () + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public abstract get; } + + public abstract T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.AggregateExpressionToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public AggregateExpressionToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, Microsoft.OData.UriParser.Aggregation.AggregationMethod method, string alias) + public AggregateExpressionToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, Microsoft.OData.UriParser.Aggregation.AggregationMethodDefinition methodDefinition, string alias) + + string Alias { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Expression { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.UriParser.Aggregation.AggregationMethod Method { public get; } + Microsoft.OData.UriParser.Aggregation.AggregationMethodDefinition MethodDefinition { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.AggregateToken : Microsoft.OData.Client.ALinq.UriParser.ApplyTransformationToken { + public AggregateToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.AggregateExpressionToken]] expressions) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.AggregateExpressionToken]] Expressions { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.AllToken : Microsoft.OData.Client.ALinq.UriParser.LambdaToken { + public AllToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, string parameter, Microsoft.OData.Client.ALinq.UriParser.QueryToken parent) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.AnyToken : Microsoft.OData.Client.ALinq.UriParser.LambdaToken { + public AnyToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, string parameter, Microsoft.OData.Client.ALinq.UriParser.QueryToken parent) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.BinaryOperatorToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public BinaryOperatorToken (Microsoft.OData.UriParser.BinaryOperatorKind operatorKind, Microsoft.OData.Client.ALinq.UriParser.QueryToken left, Microsoft.OData.Client.ALinq.UriParser.QueryToken right) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Left { public get; } + Microsoft.OData.UriParser.BinaryOperatorKind OperatorKind { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Right { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.CustomQueryOptionToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public CustomQueryOptionToken (string name, string value) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + string Value { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.DottedIdentifierToken : Microsoft.OData.Client.ALinq.UriParser.PathToken { + public DottedIdentifierToken (string identifier, Microsoft.OData.Client.ALinq.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.EndPathToken : Microsoft.OData.Client.ALinq.UriParser.PathToken { + public EndPathToken (string identifier, Microsoft.OData.Client.ALinq.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.ExpandTermToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public ExpandTermToken (Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken pathToNavigationProp) + public ExpandTermToken (Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken pathToNavigationProp, Microsoft.OData.Client.ALinq.UriParser.SelectToken selectOption, Microsoft.OData.Client.ALinq.UriParser.ExpandToken expandOption) + public ExpandTermToken (Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken pathToNavigationProp, Microsoft.OData.Client.ALinq.UriParser.QueryToken filterOption, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.OrderByToken]] orderByOptions, System.Nullable`1[[System.Int64]] topOption, System.Nullable`1[[System.Int64]] skipOption, System.Nullable`1[[System.Boolean]] countQueryOption, System.Nullable`1[[System.Int64]] levelsOption, Microsoft.OData.Client.ALinq.UriParser.QueryToken searchOption, Microsoft.OData.Client.ALinq.UriParser.SelectToken selectOption, Microsoft.OData.Client.ALinq.UriParser.ExpandToken expandOption) + + System.Nullable`1[[System.Boolean]] CountQueryOption { public get; } + Microsoft.OData.Client.ALinq.UriParser.ExpandToken ExpandOption { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken FilterOption { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + System.Nullable`1[[System.Int64]] LevelsOption { public get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.OrderByToken]] OrderByOptions { public get; } + Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken PathToNavigationProp { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken SearchOption { public get; } + Microsoft.OData.Client.ALinq.UriParser.SelectToken SelectOption { public get; } + System.Nullable`1[[System.Int64]] SkipOption { public get; } + System.Nullable`1[[System.Int64]] TopOption { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.ExpandToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public ExpandToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.ExpandTermToken]] expandTerms) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.ExpandTermToken]] ExpandTerms { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.FunctionCallToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public FunctionCallToken (string name, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.QueryToken]] argumentValues) + public FunctionCallToken (string name, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken]] arguments, Microsoft.OData.Client.ALinq.UriParser.QueryToken source) + + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken]] Arguments { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Source { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public static Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken[] EmptyParameterList = Microsoft.OData.Client.ALinq.UriParser.FunctionParameterToken[] + + public FunctionParameterToken (string parameterName, Microsoft.OData.Client.ALinq.UriParser.QueryToken valueToken) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + string ParameterName { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken ValueToken { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.GroupByToken : Microsoft.OData.Client.ALinq.UriParser.ApplyTransformationToken { + public GroupByToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.EndPathToken]] properties, Microsoft.OData.Client.ALinq.UriParser.ApplyTransformationToken child) + + Microsoft.OData.Client.ALinq.UriParser.ApplyTransformationToken Child { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.EndPathToken]] Properties { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.InnerPathToken : Microsoft.OData.Client.ALinq.UriParser.PathToken { + public InnerPathToken (string identifier, Microsoft.OData.Client.ALinq.UriParser.QueryToken nextToken, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.NamedValue]] namedValues) + + string Identifier { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.NamedValue]] NamedValues { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.LiteralToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public LiteralToken (object value) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + object Value { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.NamedValue { + public NamedValue (string name, Microsoft.OData.Client.ALinq.UriParser.LiteralToken value) + + string Name { public get; } + Microsoft.OData.Client.ALinq.UriParser.LiteralToken Value { public get; } +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.NonSystemToken : Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken { + public NonSystemToken (string identifier, System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.NamedValue]] namedValues, Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken nextToken) + + string Identifier { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.NamedValue]] NamedValues { public get; } + + public virtual T Accept (IPathSegmentTokenVisitor`1 visitor) + public virtual void Accept (Microsoft.OData.Client.ALinq.UriParser.IPathSegmentTokenVisitor visitor) + public virtual bool IsNamespaceOrContainerQualified () +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.OrderByToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public OrderByToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken expression, Microsoft.OData.UriParser.OrderByDirection direction) + + Microsoft.OData.UriParser.OrderByDirection Direction { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Expression { public get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.RangeVariableToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public RangeVariableToken (string name) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + string Name { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.SelectToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public SelectToken (System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken]] properties) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + System.Collections.Generic.IEnumerable`1[[Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken]] Properties { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.StarToken : Microsoft.OData.Client.ALinq.UriParser.PathToken { + public StarToken (Microsoft.OData.Client.ALinq.UriParser.QueryToken nextToken) + + string Identifier { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken NextToken { public virtual get; public virtual set; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.SystemToken : Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken { + public SystemToken (string identifier, Microsoft.OData.Client.ALinq.UriParser.PathSegmentToken nextToken) + + string Identifier { public virtual get; } + + public virtual T Accept (IPathSegmentTokenVisitor`1 visitor) + public virtual void Accept (Microsoft.OData.Client.ALinq.UriParser.IPathSegmentTokenVisitor visitor) + public virtual bool IsNamespaceOrContainerQualified () +} + +public sealed class Microsoft.OData.Client.ALinq.UriParser.UnaryOperatorToken : Microsoft.OData.Client.ALinq.UriParser.QueryToken { + public UnaryOperatorToken (Microsoft.OData.UriParser.UnaryOperatorKind operatorKind, Microsoft.OData.Client.ALinq.UriParser.QueryToken operand) + + Microsoft.OData.Client.ALinq.UriParser.QueryTokenKind Kind { public virtual get; } + Microsoft.OData.Client.ALinq.UriParser.QueryToken Operand { public get; } + Microsoft.OData.UriParser.UnaryOperatorKind OperatorKind { public get; } + + public virtual T Accept (ISyntacticTreeVisitor`1 visitor) +} +