-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Delay loading of CodeRefactoringProvider's till absolutely needed #78495
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
Conversation
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/OrderableLanguageDocumentMetadata.cs
Show resolved
Hide resolved
src/EditorFeatures/Test/CodeRefactorings/CodeRefactoringServiceTest.cs
Outdated
Show resolved
Hide resolved
|
|
||
| foreach (var type in expectedProviderTypes) | ||
| { | ||
| Assert.Contains(actualProviders, p => p.GetType() == type); |
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.
We have an AssertEx.SetEqual() helper for doing set comparisons.
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.
Actual set are CodeRefactorerProvider instances. Expected set are the types of those instances.
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.
You could say AssertEx.SetEqual(expectedProviderTypes, actualProviders.Select(p => p.GetType()) then.
(leave this as is though unless you need to do a follow-up for something else)
Delay loading of CodeRefactoringProvider's till absolutely needed. For example, we do not want to load refactoring provider for AdditonalDocument XAML files unless user is editing such files.