提交 bfc9cd99 编写于 作者: M Manish Vasani

Only log information for code fixes that can fix the diagnostics.

上级 95990dc4
...@@ -300,12 +300,12 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document ...@@ -300,12 +300,12 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document
{ {
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, fixer, cancellationToken)) await AppendFixesOrConfigurationsAsync(
{ document, span, diagnostics, fixAllForInSpan, result, fixer,
await AppendFixesOrConfigurationsAsync( hasFix: d => this.GetFixableDiagnosticIds(fixer, extensionManager).Contains(d.Id),
document, span, diagnostics, fixAllForInSpan, result, fixer, getFixes: dxs =>
hasFix: d => this.GetFixableDiagnosticIds(fixer, extensionManager).Contains(d.Id), {
getFixes: dxs => using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, fixer, cancellationToken))
{ {
if (fixAllForInSpan) if (fixAllForInSpan)
{ {
...@@ -316,9 +316,9 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document ...@@ -316,9 +316,9 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document
{ {
return GetCodeFixesAsync(document, span, fixer, isBlocking, dxs, cancellationToken); return GetCodeFixesAsync(document, span, fixer, isBlocking, dxs, cancellationToken);
} }
}, }
cancellationToken: cancellationToken).ConfigureAwait(false); },
} cancellationToken: cancellationToken).ConfigureAwait(false);
// Just need the first result if we are doing fix all in span // Just need the first result if we are doing fix all in span
if (fixAllForInSpan && result.Any()) return; if (fixAllForInSpan && result.Any()) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册