提交 42581602 编写于 作者: H Heejae Chang

renamed ICompilerDiagnosticAnalyzer to ICodeAnalysisDiagnosticAnalyzerExecutor

上级 bbf251e4
......@@ -110,7 +110,7 @@ private static Type[] GetNeutralAndCSharpAndVisualBasicTypes()
typeof(CSharp.LanguageServices.CSharpContentTypeLanguageService),
typeof(VisualBasic.LanguageServices.VisualBasicContentTypeLanguageService),
typeof(IncrementalCaches.SymbolTreeInfoIncrementalAnalyzerProvider),
typeof(CodeAnalysis.Diagnostics.EngineV2.InProcCompilerDiagnosticAnalyzer)
typeof(CodeAnalysis.Diagnostics.EngineV2.InProcCodeAnalysisDiagnosticAnalyzerExecutor)
};
return MinimalTestExportProvider.GetLanguageNeutralTypes()
......
......@@ -496,7 +496,7 @@ private IEnumerable<DiagnosticData> ConvertToLocalDiagnosticsWithoutCompilation(
ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>.Empty);
}
var executor = project.Solution.Workspace.Services.GetService<ICompilerDiagnosticAnalyzer>();
var executor = project.Solution.Workspace.Services.GetService<ICodeAnalysisDiagnosticAnalyzerExecutor>();
return await executor.AnalyzeAsync(analyzerDriver, project, cancellationToken).ConfigureAwait(false);
}
......
......@@ -7,7 +7,13 @@
namespace Microsoft.CodeAnalysis.Diagnostics.EngineV2
{
internal interface ICompilerDiagnosticAnalyzer : IWorkspaceService
/// <summary>
/// Interface to run DiagnosticAnalyzers. Implementation of this interface should be
/// able to run analyzers that can run in command line (Host agnostic DiagnosticAnalyzers)
///
/// How and where analyzers run depends on the implementation of this interface
/// </summary>
internal interface ICodeAnalysisDiagnosticAnalyzerExecutor : IWorkspaceService
{
Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync(CompilationWithAnalyzers analyzerDriver, Project project, CancellationToken cancellationToken);
}
......
......@@ -10,8 +10,8 @@
namespace Microsoft.CodeAnalysis.Diagnostics.EngineV2
{
[ExportWorkspaceService(typeof(ICompilerDiagnosticAnalyzer)), Shared]
internal class InProcCompilerDiagnosticAnalyzer : ICompilerDiagnosticAnalyzer
[ExportWorkspaceService(typeof(ICodeAnalysisDiagnosticAnalyzerExecutor)), Shared]
internal class InProcCodeAnalysisDiagnosticAnalyzerExecutor : ICodeAnalysisDiagnosticAnalyzerExecutor
{
public async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync(CompilationWithAnalyzers analyzerDriver, Project project, CancellationToken cancellationToken)
{
......
......@@ -233,8 +233,8 @@
<Compile Include="FindReferences\DocumentLocation.cs" />
<Compile Include="FindReferences\IDefinitionsAndReferencesFactory.cs" />
<Compile Include="FindReferences\SourceReferenceItem.cs" />
<Compile Include="Diagnostics\EngineV2\InProcCompilerDiagnosticAnalyzer.cs" />
<Compile Include="Diagnostics\EngineV2\ICompilerDiagnosticAnalyzer.cs" />
<Compile Include="Diagnostics\EngineV2\InProcCodeAnalysisDiagnosticAnalyzerExecutor.cs" />
<Compile Include="Diagnostics\EngineV2\ICodeAnalysisDiagnosticAnalyzerExecutor.cs" />
<Compile Include="ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs" />
<Compile Include="ReplacePropertyWithMethods\IReplacePropertyWithMethodsService.cs" />
<Compile Include="ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs" />
......
......@@ -22,10 +22,10 @@
namespace Microsoft.VisualStudio.LanguageServices.Diagnostics
{
[ExportWorkspaceService(typeof(ICompilerDiagnosticAnalyzer), layer: ServiceLayer.Host), Shared]
internal class OutOfProcCompilerDiagnosticAnalyzer : ICompilerDiagnosticAnalyzer
[ExportWorkspaceService(typeof(ICodeAnalysisDiagnosticAnalyzerExecutor), layer: ServiceLayer.Host), Shared]
internal class OutOfProcDiagnosticAnalyzerExecutor : ICodeAnalysisDiagnosticAnalyzerExecutor
{
private static readonly ICompilerDiagnosticAnalyzer _inProcAnalyzer = new InProcCompilerDiagnosticAnalyzer();
private static readonly ICodeAnalysisDiagnosticAnalyzerExecutor _inProcAnalyzer = new InProcCodeAnalysisDiagnosticAnalyzerExecutor();
private readonly IDiagnosticAnalyzerService _analyzerService;
private readonly AbstractHostDiagnosticUpdateSource _hostDiagnosticUpdateSource;
......@@ -34,7 +34,7 @@ internal class OutOfProcCompilerDiagnosticAnalyzer : ICompilerDiagnosticAnalyzer
private ChecksumScope _lastSnapshot;
[ImportingConstructor]
public OutOfProcCompilerDiagnosticAnalyzer(
public OutOfProcDiagnosticAnalyzerExecutor(
IDiagnosticAnalyzerService analyzerService,
AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
{
......
......@@ -81,7 +81,7 @@
<Compile Include="..\..\Workspaces\Remote\ServiceHub\Shared\WellKnownServiceHubServices.cs">
<Link>Shared\WellKnownServiceHubServices.cs</Link>
</Compile>
<Compile Include="Diagnostics\OutOfProcCompilerDiagnosticAnalyzer.cs" />
<Compile Include="Diagnostics\OutOfProcDiagnosticAnalyzerExecutor.cs" />
<Compile Include="Remote\RemoteHostClientServiceFactory.RemoteHostClientService.cs" />
<Compile Include="Remote\RemoteHostClientServiceFactory.cs" />
<Compile Include="Remote\JsonRpcClient.cs" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册