-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove unused type #73352
Remove unused type #73352
Conversation
@@ -138,7 +137,6 @@ protected virtual void GetServices() | |||
this.EditorOptionsService = this.Package.ComponentModel.GetService<EditorOptionsService>(); | |||
this.Workspace = this.Package.ComponentModel.GetService<VisualStudioWorkspaceImpl>(); | |||
this.EditorAdaptersFactoryService = this.Package.ComponentModel.GetService<IVsEditorAdaptersFactoryService>(); | |||
this.AnalyzerFileWatcherService = this.Package.ComponentModel.GetService<AnalyzerFileWatcherService>(); |
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 would create the instance her.e HOwever:
- nothing ever read this feild in this type.
- the constructor for that type does nothing.
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.
i noticed this as i wanted to move these calls into the constructor of AbstractLangService, and i wanted to make sure none of them were doing anything wonky.
[method: Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] | ||
internal sealed class AnalyzerFileWatcherService(SVsServiceProvider serviceProvider) | ||
{ | ||
private readonly IVsFileChangeEx _fileChangeService = (IVsFileChangeEx)serviceProvider.GetService(typeof(SVsFileChangeEx)); |
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.
the constructor of this type does nothing except grab a service, which it places in a field, but never uses.
} | ||
} | ||
|
||
internal void TrackFilePathAndReportErrorIfChanged(string filePath) |
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.
this is the only thing that could cause this type to do anything interesting. but it has no callers in roslyn. so this entire type is pointless.
removing. if someone can find a scenario where this is needed, we can return it. but we've clearly never noticed that it was doing nothing up till now.
@ToddGrun ptal. |
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.
No description provided.