@@ -50,7 +50,7 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
5050 /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
5151 protected async Task VerifyCSharpFixAsync ( string oldSource , string newSource , string batchNewSource = null , int ? codeFixIndex = null , bool allowNewCompilerDiagnostics = false , int numberOfIncrementalIterations = DefaultNumberOfIncrementalIterations , int numberOfFixAllIterations = 1 , CancellationToken cancellationToken = default ( CancellationToken ) )
5252 {
53- var t1 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfIncrementalIterations , GetSingleAnalyzerDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
53+ var t1 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfIncrementalIterations , FixEachAnalyzerDiagnosticAsync , cancellationToken ) . ConfigureAwait ( false ) ;
5454
5555 var fixAllProvider = this . GetCSharpCodeFixProvider ( ) . GetFixAllProvider ( ) ;
5656 Assert . NotEqual ( WellKnownFixAllProviders . BatchFixer , fixAllProvider ) ;
@@ -66,19 +66,19 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
6666 await t1 ;
6767 }
6868
69- var t2 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
69+ var t2 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
7070 if ( Debugger . IsAttached )
7171 {
7272 await t2 ;
7373 }
7474
75- var t3 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerProjectAsync , cancellationToken ) . ConfigureAwait ( false ) ;
75+ var t3 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInProjectAsync , cancellationToken ) . ConfigureAwait ( false ) ;
7676 if ( Debugger . IsAttached )
7777 {
7878 await t3 ;
7979 }
8080
81- var t4 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerSolutionAsync , cancellationToken ) . ConfigureAwait ( false ) ;
81+ var t4 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { batchNewSource ?? newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInSolutionAsync , cancellationToken ) . ConfigureAwait ( false ) ;
8282 if ( Debugger . IsAttached )
8383 {
8484 await t4 ;
@@ -112,7 +112,7 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
112112 /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
113113 protected async Task VerifyCSharpFixAsync ( string [ ] oldSources , string [ ] newSources , string [ ] batchNewSources = null , int ? codeFixIndex = null , bool allowNewCompilerDiagnostics = false , int numberOfIncrementalIterations = DefaultNumberOfIncrementalIterations , int numberOfFixAllIterations = 1 , CancellationToken cancellationToken = default ( CancellationToken ) )
114114 {
115- var t1 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfIncrementalIterations , GetSingleAnalyzerDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
115+ var t1 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfIncrementalIterations , FixEachAnalyzerDiagnosticAsync , cancellationToken ) . ConfigureAwait ( false ) ;
116116
117117 var fixAllProvider = this . GetCSharpCodeFixProvider ( ) . GetFixAllProvider ( ) ;
118118 Assert . NotEqual ( WellKnownFixAllProviders . BatchFixer , fixAllProvider ) ;
@@ -128,19 +128,19 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
128128 await t1 ;
129129 }
130130
131- var t2 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
131+ var t2 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
132132 if ( Debugger . IsAttached )
133133 {
134134 await t2 ;
135135 }
136136
137- var t3 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerProjectAsync , cancellationToken ) . ConfigureAwait ( false ) ;
137+ var t3 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInProjectAsync , cancellationToken ) . ConfigureAwait ( false ) ;
138138 if ( Debugger . IsAttached )
139139 {
140140 await t3 ;
141141 }
142142
143- var t4 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , GetFixAllAnalyzerSolutionAsync , cancellationToken ) . ConfigureAwait ( false ) ;
143+ var t4 = this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , oldSources , batchNewSources ?? newSources , codeFixIndex , allowNewCompilerDiagnostics , numberOfFixAllIterations , FixAllAnalyzerDiagnosticsInSolutionAsync , cancellationToken ) . ConfigureAwait ( false ) ;
144144 if ( Debugger . IsAttached )
145145 {
146146 await t4 ;
@@ -170,7 +170,7 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
170170 /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
171171 protected async Task VerifyCSharpFixAllFixAsync ( string oldSource , string newSource , int ? codeFixIndex = null , bool allowNewCompilerDiagnostics = false , int numberOfIterations = 1 , CancellationToken cancellationToken = default ( CancellationToken ) )
172172 {
173- await this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfIterations , GetFixAllAnalyzerDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
173+ await this . VerifyFixInternalAsync ( LanguageNames . CSharp , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , new [ ] { oldSource } , new [ ] { newSource } , codeFixIndex , allowNewCompilerDiagnostics , numberOfIterations , FixAllAnalyzerDiagnosticsInDocumentAsync , cancellationToken ) . ConfigureAwait ( false ) ;
174174 }
175175
176176 /// <summary>
@@ -185,7 +185,7 @@ public abstract partial class CodeFixVerifier : DiagnosticVerifier
185185 return await this . GetOfferedFixesInternalAsync ( LanguageNames . CSharp , source , diagnosticIndex , this . GetCSharpDiagnosticAnalyzers ( ) . ToImmutableArray ( ) , this . GetCSharpCodeFixProvider ( ) , cancellationToken ) . ConfigureAwait ( false ) ;
186186 }
187187
188- private static async Task < Project > GetSingleAnalyzerDocumentAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
188+ private static async Task < Project > FixEachAnalyzerDiagnosticAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
189189 {
190190 int expectedNumberOfIterations = numberOfIterations ;
191191 if ( numberOfIterations < 0 )
@@ -252,22 +252,22 @@ private static async Task<Project> GetSingleAnalyzerDocumentAsync(ImmutableArray
252252 return project ;
253253 }
254254
255- private static Task < Project > GetFixAllAnalyzerDocumentAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
255+ private static Task < Project > FixAllAnalyzerDiagnosticsInDocumentAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
256256 {
257- return GetFixAllAnalyzerAsync ( FixAllScope . Document , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
257+ return FixAllAnalyerDiagnosticsInScopeAsync ( FixAllScope . Document , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
258258 }
259259
260- private static Task < Project > GetFixAllAnalyzerProjectAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
260+ private static Task < Project > FixAllAnalyzerDiagnosticsInProjectAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
261261 {
262- return GetFixAllAnalyzerAsync ( FixAllScope . Project , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
262+ return FixAllAnalyerDiagnosticsInScopeAsync ( FixAllScope . Project , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
263263 }
264264
265- private static Task < Project > GetFixAllAnalyzerSolutionAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
265+ private static Task < Project > FixAllAnalyzerDiagnosticsInSolutionAsync ( ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
266266 {
267- return GetFixAllAnalyzerAsync ( FixAllScope . Solution , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
267+ return FixAllAnalyerDiagnosticsInScopeAsync ( FixAllScope . Solution , analyzers , codeFixProvider , codeFixIndex , project , numberOfIterations , cancellationToken ) ;
268268 }
269269
270- private static async Task < Project > GetFixAllAnalyzerAsync ( FixAllScope scope , ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
270+ private static async Task < Project > FixAllAnalyerDiagnosticsInScopeAsync ( FixAllScope scope , ImmutableArray < DiagnosticAnalyzer > analyzers , CodeFixProvider codeFixProvider , int ? codeFixIndex , Project project , int numberOfIterations , CancellationToken cancellationToken )
271271 {
272272 int expectedNumberOfIterations = numberOfIterations ;
273273 if ( numberOfIterations < 0 )
0 commit comments