-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose more information about path segments and selected items #2354
base: release-7.x
Are you sure you want to change the base?
Conversation
So it turns out when I ran all the unit tests in Visual Studio 2022 Preview the Found the output logs and the test process is crashing:
Edit: |
Others look good to me. |
@corranrogue9 / @gathogojr any feedback on this PR? |
@corranrogue9 / @gathogojr ping? |
src/Microsoft.OData.Core/UriParser/SemanticAst/SelectExpandClause.cs
Outdated
Show resolved
Hide resolved
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
/// </summary> | ||
public int Count | ||
internal IList<ODataPathSegment> Segments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a ReadOnlyCollection
similar to this https://github.com/OData/WebApi/blob/7a3372ac031968996141de9f77ff0ac93333e642/src/Microsoft.AspNet.OData.Shared/Routing/ODataPath.cs#L94
Issues
Improve
ODataPath
andSelectExpandClause
so more information is exposed through the abstractions.Description
This small PR contains a few changes:
ODataPath
to avoid unnecessary enumeration.ODataPath
to avoid boxing. We could have directly exposedList<ODataPathSegment>.Enumerator
but the fact it's using aList<T>
is an implementation detail.IList<SelectItem>
instead of anIEnumerable<SelectItem>
so the count can be efficiently obtained, and indexing can be performed for random access.Checklist (Uncheck if it is not completed)