Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feature/http language support #5778
base: main
Are you sure you want to change the base?
Feature/http language support #5778
Changes from 33 commits
8dd143d
c7e352a
c2c7443
3a25dab
9bcac7d
5154280
80d771c
bac834f
31c3c53
0ec5815
f033a45
f2f1c8e
ec4aea7
da3bf05
69ba9ac
3852185
7508ebd
0c7e0ee
41345d5
cfabf37
cfbbefe
ff4caed
d9f7584
69bac1f
fc39c89
6900e7e
2ade0bd
0343d2a
0fa1c0d
106cbae
4f2bda2
41dbd77
7d30713
4ccc263
d9da636
ef519d1
51c6e25
cfb3024
fdfabb7
407f61a
54c3d8f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Would it make sense to call this from the refiner method directly as this would handle the traversal of the tree for you?
My concern here is that if two classes exist in the same namespace, you'll traverse them twice as you will be referencing to the same namespace and select all the children over again.
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 you give an example of how the traversal would look like?
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.
At the moment,
AddPathParameters
is currently called fromRemoveUnusedCodeElements
.Since
RemoveUnusedCodeElements
crawls the tree, it will go through each element in the DOM(line 90).So, if you have two classes in the same namespace, each class may be called as a parameter for
AddPathParameters
meaning that you will get the same namespace twice(for each time you encounter the class) and enumerateALL
the children. (When you get to the parent of the namespace, I believe you will list all the children which were already listed in a previous iteration as they are part of the child elements of the previous parent)Instead, you can simply add a method called directly in the
RefineAsync
(after removing the classes/methods you don't need). The method would simply check if the codeElement is aCodeMethod
and the kind isCodeMethodKind.IndexerBackwardCompatibility
then add the path parameters. And crawl the tree.