提交 d6956caf 编写于 作者: J jmarolf

renaming the GetDiagnosticsAsync method to GetAnalyzerDiagnosticsAsync (changeset 1374927)

上级 f74d19c5
......@@ -867,9 +867,9 @@ public INamedTypeSymbol GetTypeByMetadataName(string fullyQualifiedMetadataName)
/// </summary>
/// <param name="analyzers">The set of analyzers to include in the analysis</param>
/// <param name="cancellationToken">A cancellation token that can be used to abort analysis.</param>
public Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken = default(CancellationToken))
public Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken = default(CancellationToken))
{
return GetDiagnosticsAsync(analyzers, null, cancellationToken);
return GetAnalyzerDiagnosticsAsync(analyzers, null, cancellationToken);
}
/// <summary>
......@@ -878,7 +878,7 @@ public Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(ImmutableArray<Diagn
/// <param name="analyzers">The set of analyzers to include in the analysis</param>
/// <param name="options">Options that are passed to analyzers</param>
/// <param name="cancellationToken">A cancellation token that can be used to abort analysis.</param>
public Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions options, CancellationToken cancellationToken = default(CancellationToken))
public Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions options, CancellationToken cancellationToken = default(CancellationToken))
{
options = options ?? AnalyzerOptions.Empty;
Compilation newCompilation = null;
......
......@@ -66,7 +66,7 @@ protected static Diagnostic[] GetSortedDiagnosticsFromDocuments(DiagnosticAnalyz
{
var compilation = project.GetCompilationAsync().GetAwaiter().GetResult();
var diags = compilation.GetDiagnosticsAsync(ImmutableArray.Create(analyzer)).GetAwaiter().GetResult();
var diags = compilation.GetAnalyzerDiagnosticsAsync(ImmutableArray.Create(analyzer)).GetAwaiter().GetResult();
foreach (var diag in diags)
{
if (diag.Location == Location.None || diag.Location.IsInMetadata)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册