src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersTests.cs (13)
203LanguageVersion = LanguageVersion.CSharp9,
229LanguageVersion = LanguageVersion.CSharp12,
566LanguageVersion = LanguageVersion.CSharp10,
596LanguageVersion = LanguageVersion.CSharp12,
623LanguageVersion = LanguageVersion.CSharp12,
645LanguageVersion = LanguageVersion.CSharp12,
657LanguageVersion = LanguageVersion.CSharp12,
689LanguageVersion = LanguageVersion.CSharp12,
713LanguageVersion = LanguageVersion.CSharp12,
740LanguageVersion = LanguageVersion.CSharp12,
789LanguageVersion = LanguageVersion.CSharp12,
837LanguageVersion = LanguageVersion.CSharp12,
885LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (21)
46LanguageVersion = LanguageVersion.CSharp9,
67LanguageVersion = LanguageVersion.CSharp9,
84LanguageVersion = LanguageVersion.CSharp10,
106LanguageVersion = LanguageVersion.CSharp10,
133LanguageVersion = LanguageVersion.CSharp10,
160LanguageVersion = LanguageVersion.CSharp10,
189LanguageVersion = LanguageVersion.CSharp10,
216LanguageVersion = LanguageVersion.CSharp10,
245LanguageVersion = LanguageVersion.CSharp10,
272LanguageVersion = LanguageVersion.CSharp10,
306LanguageVersion = LanguageVersion.CSharp10,
339LanguageVersion = LanguageVersion.CSharp10,
364LanguageVersion = LanguageVersion.CSharp10,
388LanguageVersion = LanguageVersion.CSharp10,
413LanguageVersion = LanguageVersion.CSharp10,
437LanguageVersion = LanguageVersion.CSharp10,
465LanguageVersion = LanguageVersion.CSharp10,
495LanguageVersion = LanguageVersion.CSharp10,
523LanguageVersion = LanguageVersion.CSharp10,
552LanguageVersion = LanguageVersion.CSharp10,
582LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToFileScopedNamespaceAnalyzerTests.cs (43)
32LanguageVersion = LanguageVersion.CSharp9,
51LanguageVersion = LanguageVersion.CSharp10,
72LanguageVersion = LanguageVersion.CSharp10,
93LanguageVersion = LanguageVersion.CSharp10,
116LanguageVersion = LanguageVersion.CSharp10,
138LanguageVersion = LanguageVersion.CSharp10,
159LanguageVersion = LanguageVersion.CSharp10,
180LanguageVersion = LanguageVersion.CSharp10,
212LanguageVersion = LanguageVersion.CSharp10,
236LanguageVersion = LanguageVersion.CSharp10,
264LanguageVersion = LanguageVersion.CSharp10,
294LanguageVersion = LanguageVersion.CSharp10,
323LanguageVersion = LanguageVersion.CSharp10,
351LanguageVersion = LanguageVersion.CSharp10,
381LanguageVersion = LanguageVersion.CSharp10,
411LanguageVersion = LanguageVersion.CSharp10,
452LanguageVersion = LanguageVersion.CSharp10,
486LanguageVersion = LanguageVersion.CSharp10,
520LanguageVersion = LanguageVersion.CSharp10,
568LanguageVersion = LanguageVersion.CSharp10,
616LanguageVersion = LanguageVersion.CSharp10,
666LanguageVersion = LanguageVersion.CSharp10,
720LanguageVersion = LanguageVersion.CSharp12,
775LanguageVersion = LanguageVersion.CSharp12,
830LanguageVersion = LanguageVersion.CSharp12,
850LanguageVersion = LanguageVersion.CSharp10,
871LanguageVersion = LanguageVersion.CSharp10,
899LanguageVersion = LanguageVersion.CSharp10,
920LanguageVersion = LanguageVersion.CSharp10,
948LanguageVersion = LanguageVersion.CSharp10,
969LanguageVersion = LanguageVersion.CSharp10,
999LanguageVersion = LanguageVersion.CSharp10,
1031LanguageVersion = LanguageVersion.CSharp10,
1060LanguageVersion = LanguageVersion.CSharp10,
1090LanguageVersion = LanguageVersion.CSharp10,
1162LanguageVersion = LanguageVersion.CSharp11,
1232LanguageVersion = LanguageVersion.CSharp11,
1304LanguageVersion = LanguageVersion.CSharp11,
1390LanguageVersion = LanguageVersion.CSharp11,
1462LanguageVersion = LanguageVersion.CSharp11,
1534LanguageVersion = LanguageVersion.CSharp11,
1555LanguageVersion = LanguageVersion.CSharp10,
1576LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (41)
74LanguageVersion = LanguageVersion.CSharp12,
113LanguageVersion = LanguageVersion.CSharp12,
152LanguageVersion = LanguageVersion.CSharp12,
202LanguageVersion = LanguageVersion.CSharp9,
4060LanguageVersion = LanguageVersion.CSharp7_2,
4099LanguageVersion = LanguageVersion.CSharp8,
8318LanguageVersion = LanguageVersion.CSharp7_1,
10419LanguageVersion = LanguageVersion.CSharp9,
10545LanguageVersion = LanguageVersion.CSharp12,
10578LanguageVersion = LanguageVersion.CSharp12,
10611LanguageVersion = LanguageVersion.CSharp12,
10644LanguageVersion = LanguageVersion.CSharp12,
10681LanguageVersion = LanguageVersion.CSharp12,
10712LanguageVersion = LanguageVersion.CSharp9,
10776LanguageVersion = LanguageVersion.CSharp9,
10813LanguageVersion = LanguageVersion.CSharp9,
10850LanguageVersion = LanguageVersion.CSharp9,
11024LanguageVersion = LanguageVersion.CSharp5,
11071LanguageVersion = LanguageVersion.CSharp12,
11108LanguageVersion = LanguageVersion.CSharp12,
11145LanguageVersion = LanguageVersion.CSharp12,
11182LanguageVersion = LanguageVersion.CSharp12,
11217LanguageVersion = LanguageVersion.CSharp12,
11252LanguageVersion = LanguageVersion.CSharp12,
11294LanguageVersion = LanguageVersion.CSharp12,
11329LanguageVersion = LanguageVersion.CSharp12,
11364LanguageVersion = LanguageVersion.CSharp12,
11400LanguageVersion = LanguageVersion.CSharp12,
11436LanguageVersion = LanguageVersion.CSharp12,
11472LanguageVersion = LanguageVersion.CSharp12,
11508LanguageVersion = LanguageVersion.CSharp12,
11544LanguageVersion = LanguageVersion.CSharp12,
11580LanguageVersion = LanguageVersion.CSharp12,
11656LanguageVersion = LanguageVersion.CSharp12,
11732LanguageVersion = LanguageVersion.CSharp12,
11807LanguageVersion = LanguageVersion.CSharp7_3,
11846LanguageVersion = LanguageVersion.CSharp7_2,
11886LanguageVersion = LanguageVersion.CSharp12,
12035LanguageVersion = LanguageVersion.CSharp12,
12232LanguageVersion = LanguageVersion.CSharp9,
12277LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\MakeMemberRequired\MakeMemberRequiredTests.cs (22)
138LanguageVersion = LanguageVersion.CSharp11,
162LanguageVersion = LanguageVersion.CSharp11,
186LanguageVersion = LanguageVersion.CSharp11,
206LanguageVersion = LanguageVersion.CSharp11,
239LanguageVersion = LanguageVersion.CSharp11,
261LanguageVersion = LanguageVersion.CSharp11,
288LanguageVersion = LanguageVersion.CSharp11,
307LanguageVersion = LanguageVersion.CSharp11,
334LanguageVersion = LanguageVersion.CSharp11,
353LanguageVersion = LanguageVersion.CSharp11,
379LanguageVersion = LanguageVersion.CSharp11,
412LanguageVersion = LanguageVersion.CSharp11,
434LanguageVersion = LanguageVersion.CSharp11,
454LanguageVersion = LanguageVersion.CSharp10,
475LanguageVersion = LanguageVersion.CSharp11,
495LanguageVersion = LanguageVersion.CSharp11,
521LanguageVersion = LanguageVersion.CSharp11,
547LanguageVersion = LanguageVersion.CSharp11,
571LanguageVersion = LanguageVersion.CSharp11,
595LanguageVersion = LanguageVersion.CSharp11,
621LanguageVersion = LanguageVersion.CSharp11,
645LanguageVersion = LanguageVersion.CSharp11,
src\Analyzers\CSharp\Tests\MakeStructMemberReadOnly\MakeStructMemberReadOnlyTests.cs (35)
458LanguageVersion = LanguageVersion.CSharp7,
999LanguageVersion = LanguageVersion.CSharp10,
1408LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1476LanguageVersion = LanguageVersion.CSharp12,
1534LanguageVersion = LanguageVersion.CSharp12,
1592LanguageVersion = LanguageVersion.CSharp12,
1650LanguageVersion = LanguageVersion.CSharp12,
1708LanguageVersion = LanguageVersion.CSharp12,
1728LanguageVersion = LanguageVersion.CSharp12,
1748LanguageVersion = LanguageVersion.CSharp12,
1768LanguageVersion = LanguageVersion.CSharp12,
1791LanguageVersion = LanguageVersion.CSharp12,
1814LanguageVersion = LanguageVersion.CSharp12,
1839LanguageVersion = LanguageVersion.CSharp12,
1880LanguageVersion = LanguageVersion.CSharp12,
1907LanguageVersion = LanguageVersion.CSharp12,
1925LanguageVersion = LanguageVersion.CSharp12,
1966LanguageVersion = LanguageVersion.CSharp12,
2007LanguageVersion = LanguageVersion.CSharp12,
2038LanguageVersion = LanguageVersion.CSharp12,
2058LanguageVersion = LanguageVersion.CSharp12,
2078LanguageVersion = LanguageVersion.CSharp12,
2105LanguageVersion = LanguageVersion.CSharp12,
2149LanguageVersion = LanguageVersion.CSharp12,
2176LanguageVersion = LanguageVersion.CSharp12,
2216LanguageVersion = LanguageVersion.CSharp12,
2264LanguageVersion = LanguageVersion.CSharp12,
2314LanguageVersion = LanguageVersion.CSharp12,
2364LanguageVersion = LanguageVersion.CSharp12,
2424LanguageVersion = LanguageVersion.CSharp12,
2460LanguageVersion = LanguageVersion.CSharp12,
2490LanguageVersion = LanguageVersion.CSharp12,
2520LanguageVersion = LanguageVersion.CSharp12,
2554LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\NewLines\MultipleBlankLines\MultipleBlankLinesTests.cs (10)
534LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
552LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
578LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
605LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
632LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
770LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
793LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
832LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
875LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
922LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (103)
5768LanguageVersion = LanguageVersion.CSharp7_1,
5793LanguageVersion = LanguageVersion.CSharp7_1,
5818LanguageVersion = LanguageVersion.CSharp7_1,
5858LanguageVersion = LanguageVersion.CSharp7_1,
5909LanguageVersion = LanguageVersion.CSharp7_1,
5934LanguageVersion = LanguageVersion.CSharp7_1,
5959LanguageVersion = LanguageVersion.CSharp7_1,
5999LanguageVersion = LanguageVersion.CSharp7_1,
6039LanguageVersion = LanguageVersion.CSharp7_1,
6060LanguageVersion = LanguageVersion.CSharp7_1,
6081LanguageVersion = LanguageVersion.CSharp7_1,
6102LanguageVersion = LanguageVersion.CSharp7_1,
6134LanguageVersion = LanguageVersion.CSharp7_1,
6157LanguageVersion = LanguageVersion.CSharp10,
6180LanguageVersion = LanguageVersion.CSharp10,
8229LanguageVersion = LanguageVersion.CSharp9,
8301LanguageVersion = LanguageVersion.CSharp8
8328LanguageVersion = LanguageVersion.CSharp9,
8349LanguageVersion = LanguageVersion.CSharp8
8376LanguageVersion = LanguageVersion.CSharp9,
8397LanguageVersion = LanguageVersion.CSharp8,
8424LanguageVersion = LanguageVersion.CSharp9,
8496LanguageVersion = LanguageVersion.CSharp8
8523LanguageVersion = LanguageVersion.CSharp9,
8544LanguageVersion = LanguageVersion.CSharp8
8571LanguageVersion = LanguageVersion.CSharp9,
8592LanguageVersion = LanguageVersion.CSharp8
8619LanguageVersion = LanguageVersion.CSharp9,
8797LanguageVersion = LanguageVersion.CSharp9,
9622LanguageVersion = LanguageVersion.CSharp9
9643LanguageVersion = LanguageVersion.CSharp9
9673LanguageVersion = LanguageVersion.CSharp9
9694LanguageVersion = LanguageVersion.CSharp9
9715LanguageVersion = LanguageVersion.CSharp9
9800LanguageVersion = LanguageVersion.CSharp9
9823LanguageVersion = LanguageVersion.CSharp9
9846LanguageVersion = LanguageVersion.CSharp9
9875LanguageVersion = LanguageVersion.CSharp9
9905LanguageVersion = LanguageVersion.CSharp9
9923LanguageVersion = LanguageVersion.CSharp9,
9946LanguageVersion = LanguageVersion.CSharp9,
9982LanguageVersion = LanguageVersion.CSharp9,
10010LanguageVersion = LanguageVersion.CSharp9,
10033LanguageVersion = LanguageVersion.CSharp9,
10055LanguageVersion = LanguageVersion.CSharp9,
10890LanguageVersion = LanguageVersion.CSharp9,
10929LanguageVersion = LanguageVersion.CSharp9,
11629LanguageVersion = LanguageVersion.CSharp10,
12067public async Task DoNotRemoveMethodGroupToSpecificDelegateType(LanguageVersion version)
12123LanguageVersion = LanguageVersion.CSharp10,
12159LanguageVersion = LanguageVersion.CSharp10,
12183LanguageVersion = LanguageVersion.CSharp10,
12205LanguageVersion = LanguageVersion.CSharp10,
12226LanguageVersion = LanguageVersion.CSharp10,
12247LanguageVersion = LanguageVersion.CSharp10,
12270LanguageVersion = LanguageVersion.CSharp10,
12292LanguageVersion = LanguageVersion.CSharp10,
12308LanguageVersion = LanguageVersion.CSharp10,
12330LanguageVersion = LanguageVersion.CSharp10,
12354LanguageVersion = LanguageVersion.CSharp10,
12373LanguageVersion = LanguageVersion.CSharp10,
12392LanguageVersion = LanguageVersion.CSharp10,
12416LanguageVersion = LanguageVersion.CSharp10,
12439LanguageVersion = LanguageVersion.CSharp10,
12470LanguageVersion = LanguageVersion.CSharp10,
12520LanguageVersion = LanguageVersion.CSharp10,
12561LanguageVersion = LanguageVersion.CSharp10,
12588LanguageVersion = LanguageVersion.CSharp10,
12635LanguageVersion = LanguageVersion.CSharp10,
12680LanguageVersion = LanguageVersion.CSharp10,
12699LanguageVersion = LanguageVersion.CSharp10,
12730LanguageVersion = LanguageVersion.CSharp10,
12761LanguageVersion = LanguageVersion.CSharp10,
12792LanguageVersion = LanguageVersion.CSharp10,
12823LanguageVersion = LanguageVersion.CSharp10,
12854LanguageVersion = LanguageVersion.CSharp10,
12885LanguageVersion = LanguageVersion.CSharp10,
12904LanguageVersion = LanguageVersion.CSharp10,
12930LanguageVersion = LanguageVersion.CSharp10,
12966LanguageVersion = LanguageVersion.CSharp10,
13001LanguageVersion = LanguageVersion.CSharp10,
13020LanguageVersion = LanguageVersion.CSharp10,
13075LanguageVersion = LanguageVersion.CSharp10,
13578LanguageVersion = LanguageVersion.CSharp12,
13596LanguageVersion = LanguageVersion.CSharp12,
13621LanguageVersion = LanguageVersion.CSharp12,
13648LanguageVersion = LanguageVersion.CSharp12,
13681LanguageVersion = LanguageVersion.CSharp12,
13704LanguageVersion = LanguageVersion.CSharp12,
13734LanguageVersion = LanguageVersion.CSharp12,
13778LanguageVersion = LanguageVersion.CSharp12,
13815LanguageVersion = LanguageVersion.CSharp12,
13893LanguageVersion = LanguageVersion.CSharp12,
13933LanguageVersion = LanguageVersion.CSharp12,
13954LanguageVersion = LanguageVersion.CSharp12,
13975LanguageVersion = LanguageVersion.CSharp12,
13994LanguageVersion = LanguageVersion.CSharp12,
14013LanguageVersion = LanguageVersion.CSharp12,
14032LanguageVersion = LanguageVersion.CSharp12,
14053LanguageVersion = LanguageVersion.CSharp12,
14074LanguageVersion = LanguageVersion.CSharp12,
14095LanguageVersion = LanguageVersion.CSharp12,
14118LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (18)
54LanguageVersion = LanguageVersion.CSharp9,
76LanguageVersion = LanguageVersion.CSharp8,
109LanguageVersion = LanguageVersion.CSharp9,
136LanguageVersion = LanguageVersion.CSharp9,
169LanguageVersion = LanguageVersion.CSharp9,
202LanguageVersion = LanguageVersion.CSharp9,
235LanguageVersion = LanguageVersion.CSharp9,
256LanguageVersion = LanguageVersion.CSharp9,
289LanguageVersion = LanguageVersion.CSharp9,
328LanguageVersion = LanguageVersion.CSharp9,
352LanguageVersion = LanguageVersion.CSharp9,
377LanguageVersion = LanguageVersion.CSharp9,
430LanguageVersion = LanguageVersion.CSharp9,
461LanguageVersion = LanguageVersion.CSharp9,
493LanguageVersion = LanguageVersion.CSharp9,
528LanguageVersion = LanguageVersion.CSharp9,
563LanguageVersion = LanguageVersion.CSharp9,
601LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.cs (13)
446LanguageVersion = LanguageVersion.CSharp9,
474LanguageVersion = LanguageVersion.CSharp9,
493LanguageVersion = LanguageVersion.CSharp9,
520LanguageVersion = LanguageVersion.CSharp9,
1176LanguageVersion = LanguageVersion.CSharp9,
3124LanguageVersion = LanguageVersion.CSharp9,
3270LanguageVersion = LanguageVersion.CSharp13,
3368LanguageVersion = LanguageVersion.CSharp13,
3402LanguageVersion = LanguageVersion.CSharp13,
3425LanguageVersion = LanguageVersion.CSharp13,
3449LanguageVersion = LanguageVersion.CSharp13,
3480LanguageVersion = LanguageVersion.CSharp13,
3529LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (61)
961LanguageVersion = LanguageVersion.CSharp6,
2728""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
2767[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
2843LanguageVersion = LanguageVersion.CSharp9,
3002""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3008[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
3071LanguageVersion = LanguageVersion.CSharp9,
3114""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3120[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
3208LanguageVersion = LanguageVersion.CSharp9,
3251""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
3374LanguageVersion = LanguageVersion.CSharp9,
5466""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9));
8229""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8245""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8269""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8293""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8313""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8464""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8470[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
8551LanguageVersion = LanguageVersion.CSharp9,
8878""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3));
8916""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8938parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
8961parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
9118""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9124[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9156""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9182""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9217LanguageVersion = LanguageVersion.CSharp9,
9228[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9256[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9300""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9339LanguageVersion = LanguageVersion.CSharp9,
9712LanguageVersion = LanguageVersion.CSharp9,
9750LanguageVersion = LanguageVersion.CSharp9,
9791LanguageVersion = LanguageVersion.CSharp9,
9832LanguageVersion = LanguageVersion.CSharp9,
9873LanguageVersion = LanguageVersion.CSharp9,
9914LanguageVersion = LanguageVersion.CSharp9,
9955LanguageVersion = LanguageVersion.CSharp11,
9997LanguageVersion = LanguageVersion.CSharp11,
10039LanguageVersion = LanguageVersion.CSharp11,
10062LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (25)
24private static readonly ImmutableArray<LanguageVersion> s_csharp7_1above =
25[LanguageVersion.CSharp7_1, LanguageVersion.Latest];
27private static readonly ImmutableArray<LanguageVersion> s_csharp7below =
29LanguageVersion.CSharp7,
30LanguageVersion.CSharp6,
31LanguageVersion.CSharp5,
32LanguageVersion.CSharp4,
33LanguageVersion.CSharp3,
34LanguageVersion.CSharp2,
35LanguageVersion.CSharp1,
38private async Task TestWithLanguageVersionsAsync(string initialMarkup, string expectedMarkup, ImmutableArray<LanguageVersion> versions)
40foreach (var version in versions)
47private async Task TestMissingWithLanguageVersionsAsync(string initialMarkup, ImmutableArray<LanguageVersion> versions)
49foreach (var version in versions)
808""", [LanguageVersion.CSharp7_1, LanguageVersion.CSharp10, LanguageVersion.CSharp11, LanguageVersion.Latest]);
863""", [LanguageVersion.CSharp7_1, LanguageVersion.CSharp10, LanguageVersion.CSharp11, LanguageVersion.Latest]);
953""", [LanguageVersion.CSharp7_1]);
979""", [LanguageVersion.Latest]);
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (111)
33LanguageVersion expected,
77LanguageVersion.CSharp8,
78new CSharpParseOptions(LanguageVersion.CSharp7_2));
91LanguageVersion.CSharp8,
92new CSharpParseOptions(LanguageVersion.CSharp7));
108LanguageVersion.CSharp7,
109new CSharpParseOptions(LanguageVersion.CSharp6));
125LanguageVersion.CSharp6,
126new CSharpParseOptions(LanguageVersion.CSharp5));
142LanguageVersion.CSharp5,
143new CSharpParseOptions(LanguageVersion.CSharp4));
153#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
156LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
157new CSharpParseOptions(LanguageVersion.CSharp7));
190LanguageVersion.CSharp7_1,
191new CSharpParseOptions(LanguageVersion.CSharp7));
201#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
204LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
205new CSharpParseOptions(LanguageVersion.CSharp7_1));
218LanguageVersion.CSharp7_1,
219new CSharpParseOptions(LanguageVersion.CSharp7));
235LanguageVersion.CSharp7_2,
236new CSharpParseOptions(LanguageVersion.CSharp7_1));
254LanguageVersion.CSharp7_1,
255new CSharpParseOptions(LanguageVersion.CSharp7));
266#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
269LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
270new CSharpParseOptions(LanguageVersion.CSharp7_2));
285LanguageVersion.CSharp7_3,
286new CSharpParseOptions(LanguageVersion.CSharp7_2));
298LanguageVersion.CSharp7_3,
299new CSharpParseOptions(LanguageVersion.CSharp7_2));
311LanguageVersion.CSharp7_3,
312new CSharpParseOptions(LanguageVersion.CSharp7_2));
324LanguageVersion.CSharp7_3,
325new CSharpParseOptions(LanguageVersion.CSharp7_2));
337#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
340LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
341new CSharpParseOptions(LanguageVersion.CSharp7_3));
351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|]
354LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
355new CSharpParseOptions(LanguageVersion.CSharp7_3));
371expected: LanguageVersion.CSharp8,
372new CSharpParseOptions(LanguageVersion.CSharp7_3));
401LanguageVersion.CSharp7,
428LanguageVersion.CSharp8,
459LanguageVersion.CSharp8,
485LanguageVersion.CSharp9,
610var defaultVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
664var defaultEffectiveVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
702LanguageVersion.CSharp9,
703new CSharpParseOptions(LanguageVersion.CSharp8));
715LanguageVersion.CSharp7_3,
716new CSharpParseOptions(LanguageVersion.CSharp7));
748LanguageVersion.CSharp7_3,
749new CSharpParseOptions(LanguageVersion.CSharp7));
777LanguageVersion.CSharp7_3,
778new CSharpParseOptions(LanguageVersion.CSharp7));
811LanguageVersion.CSharp7_3,
812new CSharpParseOptions(LanguageVersion.CSharp7));
848expected: LanguageVersion.CSharp8,
849new CSharpParseOptions(LanguageVersion.CSharp7_3));
877new CSharpParseOptions(LanguageVersion.CSharp7_3));
890LanguageVersion.CSharp8,
891new CSharpParseOptions(LanguageVersion.CSharp7_3));
904LanguageVersion.CSharp8,
905new CSharpParseOptions(LanguageVersion.CSharp7_3));
918LanguageVersion.CSharp8,
919new CSharpParseOptions(LanguageVersion.CSharp7_3));
931LanguageVersion.CSharp8,
932new CSharpParseOptions(LanguageVersion.CSharp7_3));
964LanguageVersion.CSharp8,
965new CSharpParseOptions(LanguageVersion.CSharp7_3));
993LanguageVersion.CSharp8,
994new CSharpParseOptions(LanguageVersion.CSharp7_3));
1027LanguageVersion.CSharp8,
1028new CSharpParseOptions(LanguageVersion.CSharp7_3));
1064expected: LanguageVersion.CSharp9,
1065new CSharpParseOptions(LanguageVersion.CSharp8));
1090expected: LanguageVersion.CSharp10,
1091new CSharpParseOptions(LanguageVersion.CSharp9));
1101LanguageVersion.CSharp12,
1102new CSharpParseOptions(LanguageVersion.CSharp11));
1112LanguageVersion.CSharp12,
1113new CSharpParseOptions(LanguageVersion.CSharp11));
1123LanguageVersion.CSharp12,
1124new CSharpParseOptions(LanguageVersion.CSharp11));
1134LanguageVersion.CSharp12,
1135new CSharpParseOptions(LanguageVersion.CSharp11));
1145LanguageVersion.CSharp12,
1146new CSharpParseOptions(LanguageVersion.CSharp11));
1156LanguageVersion.CSharp12,
1157new CSharpParseOptions(LanguageVersion.CSharp11));
1169LanguageVersion.CSharp9,
1170new CSharpParseOptions(LanguageVersion.CSharp8));
1179LanguageVersion.CSharp10,
1180new CSharpParseOptions(LanguageVersion.CSharp9));
1198expected: LanguageVersion.CSharp10,
1199new CSharpParseOptions(LanguageVersion.CSharp9));
1214expected: LanguageVersion.CSharp9,
1215new CSharpParseOptions(LanguageVersion.CSharp8));
1232expected: LanguageVersion.CSharp11,
1233new CSharpParseOptions(LanguageVersion.CSharp8));
1246expected: LanguageVersion.CSharp11,
1247new CSharpParseOptions(LanguageVersion.CSharp10));
1260expected: LanguageVersion.CSharp11,
1261new CSharpParseOptions(LanguageVersion.CSharp10));
1274expected: LanguageVersion.CSharp11,
1275new CSharpParseOptions(LanguageVersion.CSharp10));
1291expected: LanguageVersion.CSharp12,
1292new CSharpParseOptions(LanguageVersion.CSharp11));
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForArrayTests.cs (26)
35LanguageVersion = LanguageVersion.CSharp11,
56LanguageVersion = LanguageVersion.CSharp12,
77LanguageVersion = LanguageVersion.CSharp12,
98LanguageVersion = LanguageVersion.CSharp12,
123LanguageVersion = LanguageVersion.CSharp12,
148LanguageVersion = LanguageVersion.CSharp12,
169LanguageVersion = LanguageVersion.CSharp12,
190LanguageVersion = LanguageVersion.CSharp12,
205LanguageVersion = LanguageVersion.CSharp12,
230LanguageVersion = LanguageVersion.CSharp12,
251LanguageVersion = LanguageVersion.CSharp12,
278LanguageVersion = LanguageVersion.CSharp12,
299LanguageVersion = LanguageVersion.CSharp12,
320LanguageVersion = LanguageVersion.CSharp12,
341LanguageVersion = LanguageVersion.CSharp12,
356LanguageVersion = LanguageVersion.CSharp12,
371LanguageVersion = LanguageVersion.CSharp12,
386LanguageVersion = LanguageVersion.CSharp12,
407LanguageVersion = LanguageVersion.CSharp12,
422LanguageVersion = LanguageVersion.CSharp12,
447LanguageVersion = LanguageVersion.CSharp12,
474LanguageVersion = LanguageVersion.CSharp12,
489LanguageVersion = LanguageVersion.CSharp12,
510LanguageVersion = LanguageVersion.CSharp12,
529LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForBuilderTests.cs (44)
84LanguageVersion = LanguageVersion.CSharp11,
107LanguageVersion = LanguageVersion.CSharp12,
141LanguageVersion = LanguageVersion.CSharp12,
175LanguageVersion = LanguageVersion.CSharp12,
199LanguageVersion = LanguageVersion.CSharp12,
237LanguageVersion = LanguageVersion.CSharp12,
275LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
351LanguageVersion = LanguageVersion.CSharp12,
377LanguageVersion = LanguageVersion.CSharp12,
401LanguageVersion = LanguageVersion.CSharp12,
442LanguageVersion = LanguageVersion.CSharp12,
485LanguageVersion = LanguageVersion.CSharp12,
515LanguageVersion = LanguageVersion.CSharp12,
545LanguageVersion = LanguageVersion.CSharp12,
592LanguageVersion = LanguageVersion.CSharp12,
639LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
726LanguageVersion = LanguageVersion.CSharp12,
768LanguageVersion = LanguageVersion.CSharp12,
810LanguageVersion = LanguageVersion.CSharp12,
856LanguageVersion = LanguageVersion.CSharp12,
894LanguageVersion = LanguageVersion.CSharp12,
932LanguageVersion = LanguageVersion.CSharp12,
970LanguageVersion = LanguageVersion.CSharp12,
995LanguageVersion = LanguageVersion.CSharp12,
1034LanguageVersion = LanguageVersion.CSharp12,
1072LanguageVersion = LanguageVersion.CSharp12,
1110LanguageVersion = LanguageVersion.CSharp12,
1148LanguageVersion = LanguageVersion.CSharp12,
1186LanguageVersion = LanguageVersion.CSharp12,
1212LanguageVersion = LanguageVersion.CSharp12,
1238LanguageVersion = LanguageVersion.CSharp12,
1278LanguageVersion = LanguageVersion.CSharp12,
1317LanguageVersion = LanguageVersion.CSharp12,
1360LanguageVersion = LanguageVersion.CSharp12,
1383LanguageVersion = LanguageVersion.CSharp12,
1405LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1482LanguageVersion = LanguageVersion.CSharp12,
1521LanguageVersion = LanguageVersion.CSharp12,
1559LanguageVersion = LanguageVersion.CSharp12,
1584LanguageVersion = LanguageVersion.CSharp12,
1625LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForCreateTests.cs (52)
77LanguageVersion = LanguageVersion.CSharp11,
99LanguageVersion = LanguageVersion.CSharp12,
121LanguageVersion = LanguageVersion.CSharp12,
149LanguageVersion = LanguageVersion.CSharp12,
170LanguageVersion = LanguageVersion.CSharp12,
192LanguageVersion = LanguageVersion.CSharp12,
214LanguageVersion = LanguageVersion.CSharp12,
236LanguageVersion = LanguageVersion.CSharp12,
258LanguageVersion = LanguageVersion.CSharp12,
280LanguageVersion = LanguageVersion.CSharp12,
296LanguageVersion = LanguageVersion.CSharp12,
318LanguageVersion = LanguageVersion.CSharp12,
340LanguageVersion = LanguageVersion.CSharp12,
362LanguageVersion = LanguageVersion.CSharp12,
378LanguageVersion = LanguageVersion.CSharp12,
394LanguageVersion = LanguageVersion.CSharp12,
416LanguageVersion = LanguageVersion.CSharp12,
438LanguageVersion = LanguageVersion.CSharp12,
460LanguageVersion = LanguageVersion.CSharp12,
476LanguageVersion = LanguageVersion.CSharp12,
508LanguageVersion = LanguageVersion.CSharp12,
530LanguageVersion = LanguageVersion.CSharp12,
552LanguageVersion = LanguageVersion.CSharp12,
574LanguageVersion = LanguageVersion.CSharp12,
596LanguageVersion = LanguageVersion.CSharp12,
614LanguageVersion = LanguageVersion.CSharp12,
632LanguageVersion = LanguageVersion.CSharp12,
658LanguageVersion = LanguageVersion.CSharp12,
684LanguageVersion = LanguageVersion.CSharp12,
710LanguageVersion = LanguageVersion.CSharp12,
736LanguageVersion = LanguageVersion.CSharp12,
762LanguageVersion = LanguageVersion.CSharp12,
788LanguageVersion = LanguageVersion.CSharp12,
807LanguageVersion = LanguageVersion.CSharp12,
829LanguageVersion = LanguageVersion.CSharp12,
853LanguageVersion = LanguageVersion.CSharp12,
884LanguageVersion = LanguageVersion.CSharp12,
906LanguageVersion = LanguageVersion.CSharp12,
940LanguageVersion = LanguageVersion.CSharp12,
962LanguageVersion = LanguageVersion.CSharp12,
996LanguageVersion = LanguageVersion.CSharp12,
1012LanguageVersion = LanguageVersion.CSharp12,
1040LanguageVersion = LanguageVersion.CSharp12,
1078LanguageVersion = LanguageVersion.CSharp12,
1115LanguageVersion = LanguageVersion.CSharp12,
1156LanguageVersion = LanguageVersion.CSharp12,
1181LanguageVersion = LanguageVersion.CSharp12,
1206LanguageVersion = LanguageVersion.CSharp12,
1240LanguageVersion = LanguageVersion.CSharp12,
1266LanguageVersion = LanguageVersion.CSharp12,
1284LanguageVersion = LanguageVersion.CSharp12,
1324LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForEmptyTests.cs (49)
51LanguageVersion = LanguageVersion.CSharp12,
82LanguageVersion = LanguageVersion.CSharp12,
113LanguageVersion = LanguageVersion.CSharp12,
142LanguageVersion = LanguageVersion.CSharp12,
161LanguageVersion = LanguageVersion.CSharp12,
198LanguageVersion = LanguageVersion.CSharp12,
219LanguageVersion = LanguageVersion.CSharp12,
254LanguageVersion = LanguageVersion.CSharp12,
287LanguageVersion = LanguageVersion.CSharp12,
320LanguageVersion = LanguageVersion.CSharp12,
353LanguageVersion = LanguageVersion.CSharp12,
386LanguageVersion = LanguageVersion.CSharp12,
417LanguageVersion = LanguageVersion.CSharp12,
438LanguageVersion = LanguageVersion.CSharp12,
471LanguageVersion = LanguageVersion.CSharp12,
496LanguageVersion = LanguageVersion.CSharp12,
553LanguageVersion = LanguageVersion.CSharp12,
621LanguageVersion = LanguageVersion.CSharp12,
689LanguageVersion = LanguageVersion.CSharp12,
721LanguageVersion = LanguageVersion.CSharp12,
742LanguageVersion = LanguageVersion.CSharp12,
776LanguageVersion = LanguageVersion.CSharp12,
798LanguageVersion = LanguageVersion.CSharp12,
832LanguageVersion = LanguageVersion.CSharp12,
865LanguageVersion = LanguageVersion.CSharp12,
900LanguageVersion = LanguageVersion.CSharp12,
951LanguageVersion = LanguageVersion.CSharp12,
989LanguageVersion = LanguageVersion.CSharp12,
1041LanguageVersion = LanguageVersion.CSharp12,
1094LanguageVersion = LanguageVersion.CSharp12,
1149LanguageVersion = LanguageVersion.CSharp12,
1187LanguageVersion = LanguageVersion.CSharp12,
1244LanguageVersion = LanguageVersion.CSharp12,
1268LanguageVersion = LanguageVersion.CSharp12,
1288LanguageVersion = LanguageVersion.CSharp12,
1315LanguageVersion = LanguageVersion.CSharp12,
1352LanguageVersion = LanguageVersion.CSharp12,
1382LanguageVersion = LanguageVersion.CSharp12,
1412LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1472LanguageVersion = LanguageVersion.CSharp12,
1508LanguageVersion = LanguageVersion.CSharp12,
1548LanguageVersion = LanguageVersion.CSharp12,
1586LanguageVersion = LanguageVersion.CSharp12,
1609LanguageVersion = LanguageVersion.CSharp12,
1632LanguageVersion = LanguageVersion.CSharp12,
1669LanguageVersion = LanguageVersion.CSharp12,
1694LanguageVersion = LanguageVersion.CSharp12,
1716LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForFluentTests.cs (92)
39LanguageVersion = LanguageVersion.CSharp11,
73LanguageVersion = LanguageVersion.CSharp12,
107LanguageVersion = LanguageVersion.CSharp12,
141LanguageVersion = LanguageVersion.CSharp12,
164LanguageVersion = LanguageVersion.CSharp12,
198LanguageVersion = LanguageVersion.CSharp12,
232LanguageVersion = LanguageVersion.CSharp12,
254LanguageVersion = LanguageVersion.CSharp12,
290LanguageVersion = LanguageVersion.CSharp12,
326LanguageVersion = LanguageVersion.CSharp12,
362LanguageVersion = LanguageVersion.CSharp12,
398LanguageVersion = LanguageVersion.CSharp12,
434LanguageVersion = LanguageVersion.CSharp12,
470LanguageVersion = LanguageVersion.CSharp12,
506LanguageVersion = LanguageVersion.CSharp12,
542LanguageVersion = LanguageVersion.CSharp12,
578LanguageVersion = LanguageVersion.CSharp12,
614LanguageVersion = LanguageVersion.CSharp12,
650LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
709LanguageVersion = LanguageVersion.CSharp12,
732LanguageVersion = LanguageVersion.CSharp12,
755LanguageVersion = LanguageVersion.CSharp12,
795LanguageVersion = LanguageVersion.CSharp12,
831LanguageVersion = LanguageVersion.CSharp12,
854LanguageVersion = LanguageVersion.CSharp12,
898LanguageVersion = LanguageVersion.CSharp12,
934LanguageVersion = LanguageVersion.CSharp12,
957LanguageVersion = LanguageVersion.CSharp12,
993LanguageVersion = LanguageVersion.CSharp12,
1029LanguageVersion = LanguageVersion.CSharp12,
1071LanguageVersion = LanguageVersion.CSharp12,
1118LanguageVersion = LanguageVersion.CSharp12,
1160LanguageVersion = LanguageVersion.CSharp12,
1207LanguageVersion = LanguageVersion.CSharp12,
1233LanguageVersion = LanguageVersion.CSharp12,
1259LanguageVersion = LanguageVersion.CSharp12,
1285LanguageVersion = LanguageVersion.CSharp12,
1310LanguageVersion = LanguageVersion.CSharp12,
1335LanguageVersion = LanguageVersion.CSharp12,
1371LanguageVersion = LanguageVersion.CSharp12,
1407LanguageVersion = LanguageVersion.CSharp12,
1443LanguageVersion = LanguageVersion.CSharp12,
1481LanguageVersion = LanguageVersion.CSharp12,
1519LanguageVersion = LanguageVersion.CSharp12,
1543LanguageVersion = LanguageVersion.CSharp12,
1570LanguageVersion = LanguageVersion.CSharp12,
1608LanguageVersion = LanguageVersion.CSharp12,
1646LanguageVersion = LanguageVersion.CSharp12,
1684LanguageVersion = LanguageVersion.CSharp12,
1728LanguageVersion = LanguageVersion.CSharp12,
1772LanguageVersion = LanguageVersion.CSharp12,
1810LanguageVersion = LanguageVersion.CSharp12,
1848LanguageVersion = LanguageVersion.CSharp12,
1894LanguageVersion = LanguageVersion.CSharp12,
1939LanguageVersion = LanguageVersion.CSharp12,
1973LanguageVersion = LanguageVersion.CSharp12,
1995LanguageVersion = LanguageVersion.CSharp12,
2031LanguageVersion = LanguageVersion.CSharp12,
2079LanguageVersion = LanguageVersion.CSharp12,
2114LanguageVersion = LanguageVersion.CSharp12,
2149LanguageVersion = LanguageVersion.CSharp12,
2183LanguageVersion = LanguageVersion.CSharp12,
2206LanguageVersion = LanguageVersion.CSharp12,
2242LanguageVersion = LanguageVersion.CSharp12,
2265LanguageVersion = LanguageVersion.CSharp12,
2301LanguageVersion = LanguageVersion.CSharp12,
2324LanguageVersion = LanguageVersion.CSharp12,
2360LanguageVersion = LanguageVersion.CSharp12,
2398LanguageVersion = LanguageVersion.CSharp12,
2432LanguageVersion = LanguageVersion.CSharp12,
2466LanguageVersion = LanguageVersion.CSharp12,
2501LanguageVersion = LanguageVersion.CSharp12,
2536LanguageVersion = LanguageVersion.CSharp12,
2573LanguageVersion = LanguageVersion.CSharp12,
2610LanguageVersion = LanguageVersion.CSharp12,
2650LanguageVersion = LanguageVersion.CSharp12,
2674LanguageVersion = LanguageVersion.CSharp12,
2698LanguageVersion = LanguageVersion.CSharp12,
2726LanguageVersion = LanguageVersion.CSharp12,
2777LanguageVersion = LanguageVersion.CSharp12,
2810LanguageVersion = LanguageVersion.CSharp12,
2832LanguageVersion = LanguageVersion.CSharp12,
2872LanguageVersion = LanguageVersion.CSharp12,
2908LanguageVersion = LanguageVersion.CSharp12,
2935LanguageVersion = LanguageVersion.CSharp12,
2978LanguageVersion = LanguageVersion.CSharp12,
3012LanguageVersion = LanguageVersion.CSharp12,
3046LanguageVersion = LanguageVersion.CSharp12,
3080LanguageVersion = LanguageVersion.CSharp12,
3114LanguageVersion = LanguageVersion.CSharp12,
3150LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForStackAllocTests.cs (56)
38LanguageVersion = LanguageVersion.CSharp11,
59LanguageVersion = LanguageVersion.CSharp11,
80LanguageVersion = LanguageVersion.CSharp12,
101LanguageVersion = LanguageVersion.CSharp12,
133LanguageVersion = LanguageVersion.CSharp12,
165LanguageVersion = LanguageVersion.CSharp12,
197LanguageVersion = LanguageVersion.CSharp12,
229LanguageVersion = LanguageVersion.CSharp12,
250LanguageVersion = LanguageVersion.CSharp12,
271LanguageVersion = LanguageVersion.CSharp12,
292LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
347LanguageVersion = LanguageVersion.CSharp12,
368LanguageVersion = LanguageVersion.CSharp12,
389LanguageVersion = LanguageVersion.CSharp12,
410LanguageVersion = LanguageVersion.CSharp12,
431LanguageVersion = LanguageVersion.CSharp12,
467LanguageVersion = LanguageVersion.CSharp12,
503LanguageVersion = LanguageVersion.CSharp12,
535LanguageVersion = LanguageVersion.CSharp12,
567LanguageVersion = LanguageVersion.CSharp12,
589LanguageVersion = LanguageVersion.CSharp12,
621LanguageVersion = LanguageVersion.CSharp12,
642LanguageVersion = LanguageVersion.CSharp12,
674LanguageVersion = LanguageVersion.CSharp12,
695LanguageVersion = LanguageVersion.CSharp12,
717LanguageVersion = LanguageVersion.CSharp12,
741LanguageVersion = LanguageVersion.CSharp12,
763LanguageVersion = LanguageVersion.CSharp12,
785LanguageVersion = LanguageVersion.CSharp12,
809LanguageVersion = LanguageVersion.CSharp12,
833LanguageVersion = LanguageVersion.CSharp12,
855LanguageVersion = LanguageVersion.CSharp12,
877LanguageVersion = LanguageVersion.CSharp12,
900LanguageVersion = LanguageVersion.CSharp12,
933LanguageVersion = LanguageVersion.CSharp12,
968LanguageVersion = LanguageVersion.CSharp12,
1002LanguageVersion = LanguageVersion.CSharp12,
1038LanguageVersion = LanguageVersion.CSharp12,
1061LanguageVersion = LanguageVersion.CSharp12,
1085LanguageVersion = LanguageVersion.CSharp12,
1111LanguageVersion = LanguageVersion.CSharp12,
1151LanguageVersion = LanguageVersion.CSharp12,
1191LanguageVersion = LanguageVersion.CSharp12,
1229LanguageVersion = LanguageVersion.CSharp12,
1269LanguageVersion = LanguageVersion.CSharp12,
1305LanguageVersion = LanguageVersion.CSharp12,
1343LanguageVersion = LanguageVersion.CSharp12,
1381LanguageVersion = LanguageVersion.CSharp12,
1421LanguageVersion = LanguageVersion.CSharp12,
1457LanguageVersion = LanguageVersion.CSharp12,
1495LanguageVersion = LanguageVersion.CSharp12,
1533LanguageVersion = LanguageVersion.CSharp12,
1575LanguageVersion = LanguageVersion.CSharp12,
1595LanguageVersion = LanguageVersion.CSharp12,
1631LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionInitializer\UseCollectionInitializerTests_CollectionExpression.cs (24)
31LanguageVersion = LanguageVersion.CSharp12,
375LanguageVersion = LanguageVersion.CSharp12,
798LanguageVersion = LanguageVersion.CSharp12,
823LanguageVersion = LanguageVersion.CSharp12,
1941LanguageVersion = LanguageVersion.CSharp12,
4385LanguageVersion = LanguageVersion.CSharp12,
5346LanguageVersion = LanguageVersion.CSharp12,
5386LanguageVersion = LanguageVersion.CSharp12,
5423LanguageVersion = LanguageVersion.CSharp12,
5457LanguageVersion = LanguageVersion.CSharp12,
5491LanguageVersion = LanguageVersion.CSharp12,
5525LanguageVersion = LanguageVersion.CSharp12,
5569LanguageVersion = LanguageVersion.CSharp12,
5603LanguageVersion = LanguageVersion.CSharp12,
5637LanguageVersion = LanguageVersion.CSharp12,
5681LanguageVersion = LanguageVersion.CSharp12,
5705LanguageVersion = LanguageVersion.CSharp12,
5743LanguageVersion = LanguageVersion.CSharp12,
5777LanguageVersion = LanguageVersion.CSharp12,
5811LanguageVersion = LanguageVersion.CSharp12,
5865LanguageVersion = LanguageVersion.CSharp12,
5887LanguageVersion = LanguageVersion.CSharp13,
5908LanguageVersion = LanguageVersion.CSharp13,
5940LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (13)
26LanguageVersion languageVersion = LanguageVersion.CSharp8,
42LanguageVersion languageVersion = LanguageVersion.CSharp8,
197""", LanguageVersion.CSharp6);
589""", LanguageVersion.Latest);
987""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
1019""", LanguageVersion.CSharp9, options: PreferImplicitTypeAlways);
1179""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
1211""", LanguageVersion.CSharp9, options: PreferImplicitTypeAlways);
1903""", LanguageVersion.CSharp9);
1949""", LanguageVersion.CSharp9, equivalenceKey: nameof(AnalyzersResources.Simplify_check));
2141LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (15)
22private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
163""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
977[InlineData(LanguageVersion.CSharp8, "(string)null")]
978[InlineData(LanguageVersion.CSharp9, "null")]
979public async Task TestConversion2_Throw1(LanguageVersion languageVersion, string expectedFalseExpression)
1043[InlineData(LanguageVersion.CSharp8, "(string)null")]
1044[InlineData(LanguageVersion.CSharp9, "null")]
1045public async Task TestConversion3(LanguageVersion languageVersion, string expectedFalseExpression)
1078[InlineData(LanguageVersion.CSharp8, "(string)null")]
1079[InlineData(LanguageVersion.CSharp9, "null")]
1080public async Task TestConversion3_Throw1(LanguageVersion languageVersion, string expectedFalseExpression)
1113[InlineData(LanguageVersion.CSharp8, "(string)null")]
1114[InlineData(LanguageVersion.CSharp9, "null")]
1115public async Task TestConversion3_Throw2(LanguageVersion languageVersion, string expectedTrue)
src\Analyzers\CSharp\Tests\UseExplicitArrayInExpressionTree\UseExplicitArrayInExpressionTreeTests.cs (16)
56LanguageVersion = LanguageVersion.CSharp13,
94LanguageVersion = LanguageVersion.CSharp13,
117LanguageVersion = LanguageVersion.CSharp13,
140LanguageVersion = LanguageVersion.CSharp13,
163LanguageVersion = LanguageVersion.CSharp13,
201LanguageVersion = LanguageVersion.CSharp13,
239LanguageVersion = LanguageVersion.CSharp13,
277LanguageVersion = LanguageVersion.CSharp13,
315LanguageVersion = LanguageVersion.CSharp13,
353LanguageVersion = LanguageVersion.CSharp13,
391LanguageVersion = LanguageVersion.CSharp13,
429LanguageVersion = LanguageVersion.CSharp13,
473LanguageVersion = LanguageVersion.CSharp13,
517LanguageVersion = LanguageVersion.CSharp13,
561LanguageVersion = LanguageVersion.CSharp13,
605LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (15)
29LanguageVersion version = LanguageVersion.CSharp8)
33ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
51LanguageVersion version = LanguageVersion.CSharp8)
55ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
71LanguageVersion version = LanguageVersion.CSharp8)
75ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
269await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp9);
308LanguageVersion = LanguageVersion.CSharp9,
505await TestWithUseBlockBodyIncludingPropertiesAndIndexers(code, fixedCode, LanguageVersion.CSharp9);
888LanguageVersion = LanguageVersion.CSharp9,
921await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
955await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (7)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
862await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp5);
875await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp6);
895await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
909await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp6);
941await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (44)
35LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp8,
57LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
78LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
99LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
120LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
135LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
162LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
177LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
192LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
213LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
240LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
262LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
297LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
324LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
345LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
366LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
387LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
408LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
429LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
444LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
465LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
486LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
501LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
517LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
536LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
559LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
582LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
607LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
642LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
665LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
688LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
717LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
732LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
756LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
781LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
806LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
831LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
848LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
865LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
890LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
915LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
932LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
949LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
974LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseObjectInitializer\UseObjectInitializerTests.cs (28)
25LanguageVersion? languageVersion = null)
77LanguageVersion = LanguageVersion.CSharp12,
184LanguageVersion = LanguageVersion.CSharp12,
249LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
358LanguageVersion = LanguageVersion.CSharp12,
405LanguageVersion = LanguageVersion.CSharp12,
452LanguageVersion = LanguageVersion.CSharp12,
498LanguageVersion = LanguageVersion.CSharp12,
547LanguageVersion = LanguageVersion.CSharp12,
598LanguageVersion = LanguageVersion.CSharp12,
618""", LanguageVersion.CSharp2);
679LanguageVersion = LanguageVersion.CSharp12,
735LanguageVersion = LanguageVersion.CSharp12,
792LanguageVersion = LanguageVersion.CSharp12,
837LanguageVersion = LanguageVersion.CSharp12,
889LanguageVersion = LanguageVersion.CSharp12,
990LanguageVersion = LanguageVersion.CSharp12,
1043LanguageVersion = LanguageVersion.CSharp12,
1155LanguageVersion = LanguageVersion.CSharp12,
1220LanguageVersion = LanguageVersion.CSharp12,
1257LanguageVersion = LanguageVersion.CSharp12,
1339LanguageVersion = LanguageVersion.CSharp12,
1412LanguageVersion = LanguageVersion.CSharp12,
1455LanguageVersion = LanguageVersion.CSharp12,
1502LanguageVersion = LanguageVersion.CSharp12,
1545LanguageVersion = LanguageVersion.CSharp12,
1592LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (34)
70LanguageVersion = LanguageVersion.CSharp7,
91LanguageVersion = LanguageVersion.CSharp7,
110LanguageVersion = LanguageVersion.CSharp7,
134LanguageVersion = LanguageVersion.CSharp7,
155LanguageVersion = LanguageVersion.CSharp8,
176LanguageVersion = LanguageVersion.CSharp9,
197LanguageVersion = LanguageVersion.CSharp8,
218LanguageVersion = LanguageVersion.CSharp9,
242LanguageVersion = LanguageVersion.CSharp9,
265LanguageVersion = LanguageVersion.CSharp8,
300LanguageVersion = LanguageVersion.CSharp9,
337LanguageVersion = LanguageVersion.CSharp10,
360LanguageVersion = LanguageVersion.CSharp8,
383LanguageVersion = LanguageVersion.CSharp8,
420LanguageVersion = LanguageVersion.CSharp10,
451LanguageVersion = LanguageVersion.CSharp9,
482LanguageVersion = LanguageVersion.CSharp9,
517LanguageVersion = LanguageVersion.CSharp9,
548LanguageVersion = LanguageVersion.CSharp9,
599LanguageVersion = LanguageVersion.CSharp9,
620LanguageVersion = LanguageVersion.CSharp9,
641LanguageVersion = LanguageVersion.CSharp9,
665LanguageVersion = LanguageVersion.CSharp9,
700LanguageVersion = LanguageVersion.CSharp9,
737LanguageVersion = LanguageVersion.CSharp10,
772LanguageVersion = LanguageVersion.CSharp9,
809LanguageVersion = LanguageVersion.CSharp10,
834LanguageVersion = LanguageVersion.CSharp9,
871LanguageVersion = LanguageVersion.CSharp10,
984LanguageVersion = LanguageVersion.CSharp9,
1037LanguageVersion = LanguageVersion.CSharp9,
1134LanguageVersion = LanguageVersion.CSharp9,
1155LanguageVersion = LanguageVersion.CSharp9,
1228LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (14)
42[InlineData("x == null", "o is not string x", LanguageVersion.CSharp9)]
43public async Task InlineTypeCheck1(string input, string output, LanguageVersion version = LanguageVersion.CSharp8)
59private async Task TestStatement(string input, string output, LanguageVersion version = LanguageVersion.CSharp8)
98""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
1166""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1205""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1471""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1502""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1557""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1589""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1652""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1694""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (16)
49LanguageVersion = LanguageVersion.CSharp9,
80LanguageVersion = LanguageVersion.CSharp9,
111LanguageVersion = LanguageVersion.CSharp9,
142LanguageVersion = LanguageVersion.CSharp9,
173LanguageVersion = LanguageVersion.CSharp9,
204LanguageVersion = LanguageVersion.CSharp9,
247LanguageVersion = LanguageVersion.CSharp9,
284LanguageVersion = LanguageVersion.CSharp9,
304LanguageVersion = LanguageVersion.CSharp8,
335LanguageVersion = LanguageVersion.CSharp9,
366LanguageVersion = LanguageVersion.CSharp9,
401LanguageVersion = LanguageVersion.CSharp9,
421LanguageVersion = LanguageVersion.CSharp9,
444LanguageVersion = LanguageVersion.CSharp9,
467LanguageVersion = LanguageVersion.CSharp9,
506LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePrimaryConstructor\UsePrimaryConstructorTests.cs (140)
40LanguageVersion = LanguageVersion.CSharp12,
57LanguageVersion = LanguageVersion.CSharp11,
74LanguageVersion = LanguageVersion.CSharp12,
96LanguageVersion = LanguageVersion.CSharp12,
117LanguageVersion = LanguageVersion.CSharp12,
146LanguageVersion = LanguageVersion.CSharp12,
183LanguageVersion = LanguageVersion.CSharp12,
220LanguageVersion = LanguageVersion.CSharp12,
259LanguageVersion = LanguageVersion.CSharp12,
298LanguageVersion = LanguageVersion.CSharp12,
339LanguageVersion = LanguageVersion.CSharp12,
355LanguageVersion = LanguageVersion.CSharp12,
373LanguageVersion = LanguageVersion.CSharp12,
397LanguageVersion = LanguageVersion.CSharp12,
421LanguageVersion = LanguageVersion.CSharp12,
445LanguageVersion = LanguageVersion.CSharp12,
469LanguageVersion = LanguageVersion.CSharp12,
490LanguageVersion = LanguageVersion.CSharp12,
511LanguageVersion = LanguageVersion.CSharp12,
529LanguageVersion = LanguageVersion.CSharp12,
550LanguageVersion = LanguageVersion.CSharp12,
574LanguageVersion = LanguageVersion.CSharp12,
603LanguageVersion = LanguageVersion.CSharp12,
630LanguageVersion = LanguageVersion.CSharp12,
658LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
715LanguageVersion = LanguageVersion.CSharp12,
738LanguageVersion = LanguageVersion.CSharp12,
793LanguageVersion = LanguageVersion.CSharp12,
832LanguageVersion = LanguageVersion.CSharp12,
871LanguageVersion = LanguageVersion.CSharp12,
910LanguageVersion = LanguageVersion.CSharp12,
951LanguageVersion = LanguageVersion.CSharp12,
994LanguageVersion = LanguageVersion.CSharp12,
1037LanguageVersion = LanguageVersion.CSharp12,
1059LanguageVersion = LanguageVersion.CSharp12,
1081LanguageVersion = LanguageVersion.CSharp12,
1111LanguageVersion = LanguageVersion.CSharp12,
1147LanguageVersion = LanguageVersion.CSharp12,
1187LanguageVersion = LanguageVersion.CSharp12,
1217LanguageVersion = LanguageVersion.CSharp12,
1265LanguageVersion = LanguageVersion.CSharp12,
1309LanguageVersion = LanguageVersion.CSharp12,
1349LanguageVersion = LanguageVersion.CSharp12,
1398LanguageVersion = LanguageVersion.CSharp12,
1445LanguageVersion = LanguageVersion.CSharp12,
1487LanguageVersion = LanguageVersion.CSharp12,
1529LanguageVersion = LanguageVersion.CSharp12,
1577LanguageVersion = LanguageVersion.CSharp12,
1625LanguageVersion = LanguageVersion.CSharp12,
1672LanguageVersion = LanguageVersion.CSharp12,
1721LanguageVersion = LanguageVersion.CSharp12,
1754LanguageVersion = LanguageVersion.CSharp12,
1786LanguageVersion = LanguageVersion.CSharp12,
1827LanguageVersion = LanguageVersion.CSharp12,
1886LanguageVersion = LanguageVersion.CSharp12,
1914LanguageVersion = LanguageVersion.CSharp12,
1942LanguageVersion = LanguageVersion.CSharp12,
1976LanguageVersion = LanguageVersion.CSharp12,
2012LanguageVersion = LanguageVersion.CSharp12,
2049LanguageVersion = LanguageVersion.CSharp12,
2088LanguageVersion = LanguageVersion.CSharp12,
2120LanguageVersion = LanguageVersion.CSharp12,
2155LanguageVersion = LanguageVersion.CSharp12,
2183LanguageVersion = LanguageVersion.CSharp12,
2217LanguageVersion = LanguageVersion.CSharp12,
2247LanguageVersion = LanguageVersion.CSharp12,
2283LanguageVersion = LanguageVersion.CSharp12,
2311LanguageVersion = LanguageVersion.CSharp12,
2345LanguageVersion = LanguageVersion.CSharp12,
2375LanguageVersion = LanguageVersion.CSharp12,
2411LanguageVersion = LanguageVersion.CSharp12,
2440LanguageVersion = LanguageVersion.CSharp12,
2473LanguageVersion = LanguageVersion.CSharp12,
2502LanguageVersion = LanguageVersion.CSharp12,
2535LanguageVersion = LanguageVersion.CSharp12,
2565LanguageVersion = LanguageVersion.CSharp12,
2586LanguageVersion = LanguageVersion.CSharp12,
2612LanguageVersion = LanguageVersion.CSharp12,
2638LanguageVersion = LanguageVersion.CSharp12,
2660LanguageVersion = LanguageVersion.CSharp12,
2682LanguageVersion = LanguageVersion.CSharp12,
2706LanguageVersion = LanguageVersion.CSharp12,
2730LanguageVersion = LanguageVersion.CSharp12,
2754LanguageVersion = LanguageVersion.CSharp12,
2778LanguageVersion = LanguageVersion.CSharp12,
2804LanguageVersion = LanguageVersion.CSharp12,
2830LanguageVersion = LanguageVersion.CSharp12,
2863LanguageVersion = LanguageVersion.CSharp12,
2904LanguageVersion = LanguageVersion.CSharp12,
2936LanguageVersion = LanguageVersion.CSharp12,
2968LanguageVersion = LanguageVersion.CSharp12,
2996LanguageVersion = LanguageVersion.CSharp12,
3024LanguageVersion = LanguageVersion.CSharp12,
3052LanguageVersion = LanguageVersion.CSharp12,
3129LanguageVersion = LanguageVersion.CSharp12,
3167LanguageVersion = LanguageVersion.CSharp12,
3212LanguageVersion = LanguageVersion.CSharp12,
3250LanguageVersion = LanguageVersion.CSharp12,
3292LanguageVersion = LanguageVersion.CSharp12,
3321LanguageVersion = LanguageVersion.CSharp12,
3343LanguageVersion = LanguageVersion.CSharp12,
3370LanguageVersion = LanguageVersion.CSharp12,
3391LanguageVersion = LanguageVersion.CSharp12,
3420LanguageVersion = LanguageVersion.CSharp12,
3442LanguageVersion = LanguageVersion.CSharp12,
3468LanguageVersion = LanguageVersion.CSharp12,
3497LanguageVersion = LanguageVersion.CSharp12,
3526LanguageVersion = LanguageVersion.CSharp12,
3555LanguageVersion = LanguageVersion.CSharp12,
3584LanguageVersion = LanguageVersion.CSharp12,
3606LanguageVersion = LanguageVersion.CSharp12,
3628LanguageVersion = LanguageVersion.CSharp12,
3645LanguageVersion = LanguageVersion.CSharp12,
3692LanguageVersion = LanguageVersion.CSharp12,
3728LanguageVersion = LanguageVersion.CSharp12,
3765LanguageVersion = LanguageVersion.CSharp12,
3791LanguageVersion = LanguageVersion.CSharp12,
3813LanguageVersion = LanguageVersion.CSharp12,
3839LanguageVersion = LanguageVersion.CSharp12,
3869LanguageVersion = LanguageVersion.CSharp12,
3912LanguageVersion = LanguageVersion.CSharp12,
3955LanguageVersion = LanguageVersion.CSharp12,
3998LanguageVersion = LanguageVersion.CSharp12,
4027LanguageVersion = LanguageVersion.CSharp12,
4070LanguageVersion = LanguageVersion.CSharp12,
4100LanguageVersion = LanguageVersion.CSharp12,
4126LanguageVersion = LanguageVersion.CSharp12,
4159LanguageVersion = LanguageVersion.CSharp12,
4188LanguageVersion = LanguageVersion.CSharp12,
4220LanguageVersion = LanguageVersion.CSharp12,
4249LanguageVersion = LanguageVersion.CSharp12,
4280LanguageVersion = LanguageVersion.CSharp12,
4308LanguageVersion = LanguageVersion.CSharp12,
4341LanguageVersion = LanguageVersion.CSharp12,
4371LanguageVersion = LanguageVersion.CSharp12,
4405LanguageVersion = LanguageVersion.CSharp12,
4436LanguageVersion = LanguageVersion.CSharp12,
4468LanguageVersion = LanguageVersion.CSharp12,
4503LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (45)
64LanguageVersion = LanguageVersion.CSharp13,
87LanguageVersion = LanguageVersion.CSharp12,
110LanguageVersion = LanguageVersion.CSharp12,
133LanguageVersion = LanguageVersion.CSharp12,
171LanguageVersion = LanguageVersion.CSharp13,
209LanguageVersion = LanguageVersion.CSharp13,
232LanguageVersion = LanguageVersion.CSharp13,
255LanguageVersion = LanguageVersion.CSharp13,
280LanguageVersion = LanguageVersion.CSharp13,
303LanguageVersion = LanguageVersion.CSharp13,
343LanguageVersion = LanguageVersion.CSharp13,
381LanguageVersion = LanguageVersion.CSharp13,
422LanguageVersion = LanguageVersion.CSharp13,
460LanguageVersion = LanguageVersion.CSharp13,
486LanguageVersion = LanguageVersion.CSharp13,
531LanguageVersion = LanguageVersion.CSharp13,
584LanguageVersion = LanguageVersion.CSharp13,
604LanguageVersion = LanguageVersion.CSharp13,
631LanguageVersion = LanguageVersion.CSharp13,
656LanguageVersion = LanguageVersion.CSharp13,
679LanguageVersion = LanguageVersion.CSharp13,
702LanguageVersion = LanguageVersion.CSharp13,
725LanguageVersion = LanguageVersion.CSharp13,
753LanguageVersion = LanguageVersion.CSharp13,
781LanguageVersion = LanguageVersion.CSharp13,
804LanguageVersion = LanguageVersion.CSharp13,
827LanguageVersion = LanguageVersion.CSharp13,
873LanguageVersion = LanguageVersion.CSharp13,
921LanguageVersion = LanguageVersion.CSharp13,
959LanguageVersion = LanguageVersion.CSharp13,
997LanguageVersion = LanguageVersion.CSharp13,
1035LanguageVersion = LanguageVersion.CSharp13,
1073LanguageVersion = LanguageVersion.CSharp13,
1121LanguageVersion = LanguageVersion.CSharp13,
1169LanguageVersion = LanguageVersion.CSharp13,
1217LanguageVersion = LanguageVersion.CSharp13,
1265LanguageVersion = LanguageVersion.CSharp13,
1321LanguageVersion = LanguageVersion.CSharp13,
1377LanguageVersion = LanguageVersion.CSharp13,
1417LanguageVersion = LanguageVersion.CSharp13,
1438LanguageVersion = LanguageVersion.CSharp13,
1478LanguageVersion = LanguageVersion.CSharp13,
1524LanguageVersion = LanguageVersion.CSharp13,
1568LanguageVersion = LanguageVersion.CSharp13,
1612LanguageVersion = LanguageVersion.CSharp13,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (5)
63CSharpCodeGenerationOptions options, LanguageVersion languageVersion,
116CSharpCodeGenerationOptions options, LanguageVersion languageVersion,
166GetAndSetMethods getAndSetMethods, CSharpCodeGenerationOptions options, LanguageVersion languageVersion, CancellationToken cancellationToken)
175CSharpCodeGenerationOptions options, LanguageVersion languageVersion,
236CSharpCodeGenerationOptions options, LanguageVersion languageVersion, CancellationToken cancellationToken)
ConvertIfToSwitch\ConvertIfToSwitchTests.cs (32)
315LanguageVersion = LanguageVersion.CSharp8,
359LanguageVersion = LanguageVersion.CSharp9,
498[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
513LanguageVersion.CSharp8 =>
529LanguageVersion.CSharp9 =>
627LanguageVersion = LanguageVersion.CSharp8,
668LanguageVersion = LanguageVersion.CSharp8,
1547LanguageVersion = LanguageVersion.CSharp8,
1597LanguageVersion = LanguageVersion.CSharp9,
1639LanguageVersion = LanguageVersion.CSharp8,
1689LanguageVersion = LanguageVersion.CSharp9,
1731LanguageVersion = LanguageVersion.CSharp8,
1781LanguageVersion = LanguageVersion.CSharp9,
1823LanguageVersion = LanguageVersion.CSharp8,
1873LanguageVersion = LanguageVersion.CSharp9,
2431LanguageVersion = LanguageVersion.CSharp8,
2476LanguageVersion = LanguageVersion.CSharp9,
2500LanguageVersion = LanguageVersion.CSharp8,
2540LanguageVersion = LanguageVersion.CSharp9,
2591LanguageVersion = LanguageVersion.CSharp9,
2617LanguageVersion = LanguageVersion.CSharp8,
2669LanguageVersion = LanguageVersion.CSharp9,
2710LanguageVersion = LanguageVersion.CSharp9,
2752LanguageVersion = LanguageVersion.CSharp9,
2801LanguageVersion = LanguageVersion.CSharp9,
2886LanguageVersion = LanguageVersion.CSharp9,
2910LanguageVersion = LanguageVersion.CSharp9,
2932LanguageVersion = LanguageVersion.CSharp9,
2954LanguageVersion = LanguageVersion.CSharp9,
2994LanguageVersion = LanguageVersion.CSharp9,
ConvertNamespace\ConvertNamespaceRefactoringTests.cs (41)
39LanguageVersion = LanguageVersion.CSharp9,
58LanguageVersion = LanguageVersion.CSharp10,
79LanguageVersion = LanguageVersion.CSharp10,
100LanguageVersion = LanguageVersion.CSharp10,
120LanguageVersion = LanguageVersion.CSharp10,
139LanguageVersion = LanguageVersion.CSharp10,
162LanguageVersion = LanguageVersion.CSharp10,
184LanguageVersion = LanguageVersion.CSharp10,
206LanguageVersion = LanguageVersion.CSharp10,
227LanguageVersion = LanguageVersion.CSharp10,
248LanguageVersion = LanguageVersion.CSharp10,
273LanguageVersion = LanguageVersion.CSharp10,
297LanguageVersion = LanguageVersion.CSharp10,
325LanguageVersion = LanguageVersion.CSharp10,
355LanguageVersion = LanguageVersion.CSharp10,
384LanguageVersion = LanguageVersion.CSharp10,
412LanguageVersion = LanguageVersion.CSharp10,
442LanguageVersion = LanguageVersion.CSharp10,
470LanguageVersion = LanguageVersion.CSharp10,
502LanguageVersion = LanguageVersion.CSharp10,
538LanguageVersion = LanguageVersion.CSharp10,
574LanguageVersion = LanguageVersion.CSharp10,
600LanguageVersion = LanguageVersion.CSharp9,
617LanguageVersion = LanguageVersion.CSharp10,
638LanguageVersion = LanguageVersion.CSharp10,
659LanguageVersion = LanguageVersion.CSharp10,
677LanguageVersion = LanguageVersion.CSharp10,
695LanguageVersion = LanguageVersion.CSharp10,
712LanguageVersion = LanguageVersion.CSharp10,
740LanguageVersion = LanguageVersion.CSharp10,
764LanguageVersion = LanguageVersion.CSharp10,
791LanguageVersion = LanguageVersion.CSharp10,
816LanguageVersion = LanguageVersion.CSharp10,
840LanguageVersion = LanguageVersion.CSharp10,
865LanguageVersion = LanguageVersion.CSharp10,
889LanguageVersion = LanguageVersion.CSharp10,
917LanguageVersion = LanguageVersion.CSharp10,
947LanguageVersion = LanguageVersion.CSharp10,
975LanguageVersion = LanguageVersion.CSharp10,
1004LanguageVersion = LanguageVersion.CSharp10,
1034LanguageVersion = LanguageVersion.CSharp10,
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorTests.cs (80)
50LanguageVersion = LanguageVersion.CSharp12,
69LanguageVersion = LanguageVersion.CSharp12,
92LanguageVersion = LanguageVersion.CSharp12,
121LanguageVersion = LanguageVersion.CSharp12,
158LanguageVersion = LanguageVersion.CSharp12,
195LanguageVersion = LanguageVersion.CSharp12,
234LanguageVersion = LanguageVersion.CSharp12,
273LanguageVersion = LanguageVersion.CSharp12,
314LanguageVersion = LanguageVersion.CSharp12,
340LanguageVersion = LanguageVersion.CSharp12,
366LanguageVersion = LanguageVersion.CSharp12,
392LanguageVersion = LanguageVersion.CSharp12,
418LanguageVersion = LanguageVersion.CSharp12,
444LanguageVersion = LanguageVersion.CSharp12,
473LanguageVersion = LanguageVersion.CSharp12,
502LanguageVersion = LanguageVersion.CSharp12,
529LanguageVersion = LanguageVersion.CSharp12,
565LanguageVersion = LanguageVersion.CSharp12,
601LanguageVersion = LanguageVersion.CSharp12,
623LanguageVersion = LanguageVersion.CSharp12,
649LanguageVersion = LanguageVersion.CSharp12,
701LanguageVersion = LanguageVersion.CSharp12,
739LanguageVersion = LanguageVersion.CSharp12,
777LanguageVersion = LanguageVersion.CSharp12,
817LanguageVersion = LanguageVersion.CSharp12,
859LanguageVersion = LanguageVersion.CSharp12,
901LanguageVersion = LanguageVersion.CSharp12,
944LanguageVersion = LanguageVersion.CSharp12,
975LanguageVersion = LanguageVersion.CSharp12,
1011LanguageVersion = LanguageVersion.CSharp12,
1051LanguageVersion = LanguageVersion.CSharp12,
1081LanguageVersion = LanguageVersion.CSharp12,
1129LanguageVersion = LanguageVersion.CSharp12,
1173LanguageVersion = LanguageVersion.CSharp12,
1213LanguageVersion = LanguageVersion.CSharp12,
1261LanguageVersion = LanguageVersion.CSharp12,
1310LanguageVersion = LanguageVersion.CSharp12,
1357LanguageVersion = LanguageVersion.CSharp12,
1393LanguageVersion = LanguageVersion.CSharp12,
1425LanguageVersion = LanguageVersion.CSharp12,
1457LanguageVersion = LanguageVersion.CSharp12,
1489LanguageVersion = LanguageVersion.CSharp12,
1525LanguageVersion = LanguageVersion.CSharp12,
1557LanguageVersion = LanguageVersion.CSharp12,
1593LanguageVersion = LanguageVersion.CSharp12,
1635LanguageVersion = LanguageVersion.CSharp12,
1673LanguageVersion = LanguageVersion.CSharp12,
1711LanguageVersion = LanguageVersion.CSharp12,
1753LanguageVersion = LanguageVersion.CSharp12,
1780LanguageVersion = LanguageVersion.CSharp12,
1808LanguageVersion = LanguageVersion.CSharp12,
1842LanguageVersion = LanguageVersion.CSharp12,
1878LanguageVersion = LanguageVersion.CSharp12,
1915LanguageVersion = LanguageVersion.CSharp12,
1954LanguageVersion = LanguageVersion.CSharp12,
1986LanguageVersion = LanguageVersion.CSharp12,
2021LanguageVersion = LanguageVersion.CSharp12,
2049LanguageVersion = LanguageVersion.CSharp12,
2083LanguageVersion = LanguageVersion.CSharp12,
2113LanguageVersion = LanguageVersion.CSharp12,
2149LanguageVersion = LanguageVersion.CSharp12,
2177LanguageVersion = LanguageVersion.CSharp12,
2211LanguageVersion = LanguageVersion.CSharp12,
2241LanguageVersion = LanguageVersion.CSharp12,
2277LanguageVersion = LanguageVersion.CSharp12,
2306LanguageVersion = LanguageVersion.CSharp12,
2339LanguageVersion = LanguageVersion.CSharp12,
2368LanguageVersion = LanguageVersion.CSharp12,
2401LanguageVersion = LanguageVersion.CSharp12,
2427LanguageVersion = LanguageVersion.CSharp12,
2449LanguageVersion = LanguageVersion.CSharp12,
2480LanguageVersion = LanguageVersion.CSharp12,
2520LanguageVersion = LanguageVersion.CSharp12,
2552LanguageVersion = LanguageVersion.CSharp12,
2592LanguageVersion = LanguageVersion.CSharp12,
2632LanguageVersion = LanguageVersion.CSharp12,
2661LanguageVersion = LanguageVersion.CSharp12,
2689LanguageVersion = LanguageVersion.CSharp12,
2717LanguageVersion = LanguageVersion.CSharp12,
2738LanguageVersion = LanguageVersion.CSharp12,
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (25)
31LanguageVersion = LanguageVersion.CSharp9,
53LanguageVersion = LanguageVersion.CSharp9,
78LanguageVersion = LanguageVersion.CSharp9,
106LanguageVersion = LanguageVersion.CSharp9,
136LanguageVersion = LanguageVersion.CSharp9,
152LanguageVersion = LanguageVersion.CSharp9,
167LanguageVersion = LanguageVersion.CSharp9,
190LanguageVersion = LanguageVersion.CSharp9,
213LanguageVersion = LanguageVersion.CSharp9,
244LanguageVersion = LanguageVersion.CSharp9,
275LanguageVersion = LanguageVersion.CSharp9,
314LanguageVersion = LanguageVersion.CSharp9,
342LanguageVersion = LanguageVersion.CSharp9,
374LanguageVersion = LanguageVersion.CSharp9,
403LanguageVersion = LanguageVersion.CSharp9,
434LanguageVersion = LanguageVersion.CSharp9,
462LanguageVersion = LanguageVersion.CSharp9,
491LanguageVersion = LanguageVersion.CSharp9,
516LanguageVersion = LanguageVersion.CSharp9,
540LanguageVersion = LanguageVersion.CSharp9,
575LanguageVersion = LanguageVersion.CSharp9,
614LanguageVersion = LanguageVersion.CSharp9,
648LanguageVersion = LanguageVersion.CSharp9,
687LanguageVersion = LanguageVersion.CSharp11,
724LanguageVersion = LanguageVersion.CSharp9,
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (56)
47LanguageVersion = LanguageVersion.CSharp9,
69LanguageVersion = LanguageVersion.CSharp8,
92LanguageVersion = LanguageVersion.CSharp9,
117LanguageVersion = LanguageVersion.CSharp9,
145LanguageVersion = LanguageVersion.CSharp9,
173LanguageVersion = LanguageVersion.CSharp10,
202LanguageVersion = LanguageVersion.CSharp10,
225LanguageVersion = LanguageVersion.CSharp9,
247LanguageVersion = LanguageVersion.CSharp9,
269LanguageVersion = LanguageVersion.CSharp9,
291LanguageVersion = LanguageVersion.CSharp9,
318LanguageVersion = LanguageVersion.CSharp9,
345LanguageVersion = LanguageVersion.CSharp9,
369LanguageVersion = LanguageVersion.CSharp9,
390LanguageVersion = LanguageVersion.CSharp9,
412LanguageVersion = LanguageVersion.CSharp9,
434LanguageVersion = LanguageVersion.CSharp9,
460LanguageVersion = LanguageVersion.CSharp9,
482LanguageVersion = LanguageVersion.CSharp9,
505LanguageVersion = LanguageVersion.CSharp9,
528LanguageVersion = LanguageVersion.CSharp9,
553LanguageVersion = LanguageVersion.CSharp9,
578LanguageVersion = LanguageVersion.CSharp9,
603LanguageVersion = LanguageVersion.CSharp9,
628LanguageVersion = LanguageVersion.CSharp9,
653LanguageVersion = LanguageVersion.CSharp9,
677LanguageVersion = LanguageVersion.CSharp9,
701LanguageVersion = LanguageVersion.CSharp9,
727LanguageVersion = LanguageVersion.CSharp9,
753LanguageVersion = LanguageVersion.CSharp9,
777LanguageVersion = LanguageVersion.CSharp9,
801LanguageVersion = LanguageVersion.CSharp9,
825LanguageVersion = LanguageVersion.CSharp9,
847LanguageVersion = LanguageVersion.CSharp9,
874LanguageVersion = LanguageVersion.CSharp9,
901LanguageVersion = LanguageVersion.CSharp9,
928LanguageVersion = LanguageVersion.CSharp9,
955LanguageVersion = LanguageVersion.CSharp9,
982LanguageVersion = LanguageVersion.CSharp9,
1009LanguageVersion = LanguageVersion.CSharp9,
1036LanguageVersion = LanguageVersion.CSharp9,
1063LanguageVersion = LanguageVersion.CSharp9,
1092LanguageVersion = LanguageVersion.CSharp9,
1116LanguageVersion = LanguageVersion.CSharp9,
1145LanguageVersion = LanguageVersion.CSharp9,
1182LanguageVersion = LanguageVersion.CSharp9,
1219LanguageVersion = LanguageVersion.CSharp9,
1260LanguageVersion = LanguageVersion.CSharp9,
1287LanguageVersion = LanguageVersion.CSharp9,
1328LanguageVersion = LanguageVersion.CSharp9,
1367LanguageVersion = LanguageVersion.CSharp10,
1409LanguageVersion = LanguageVersion.CSharp9,
1449LanguageVersion = LanguageVersion.CSharp10,
1479LanguageVersion = LanguageVersion.CSharp9,
1508LanguageVersion = LanguageVersion.CSharp10,
1553LanguageVersion = LanguageVersion.CSharp9,
ConvertTupleToStruct\ConvertTupleToStructTests.cs (5)
46LanguageVersion languageVersion = LanguageVersion.CSharp9,
172await TestAsync(text, expected, languageVersion: LanguageVersion.CSharp12, options: PreferImplicitTypeWithInfo(), testHost: host);
213await TestAsync(text, expected, languageVersion: LanguageVersion.CSharp12, options: PreferImplicitTypeWithInfo(), testHost: host);
250await TestAsync(text, expected, languageVersion: LanguageVersion.CSharp12, options: PreferImplicitTypeWithInfo(), testHost: host);
EnableNullable\EnableNullableTests.cs (21)
560[InlineData(LanguageVersion.CSharp1)]
561[InlineData(LanguageVersion.CSharp2)]
562[InlineData(LanguageVersion.CSharp3)]
563[InlineData(LanguageVersion.CSharp4)]
564[InlineData(LanguageVersion.CSharp5)]
565[InlineData(LanguageVersion.CSharp6)]
566[InlineData(LanguageVersion.CSharp7)]
567[InlineData(LanguageVersion.CSharp7_1)]
568[InlineData(LanguageVersion.CSharp7_2)]
569[InlineData(LanguageVersion.CSharp7_3)]
570public async Task DisabledForUnsupportedLanguageVersion(LanguageVersion languageVersion)
578LanguageVersion.CSharp1 => "CS8022",
579LanguageVersion.CSharp2 => "CS8023",
580LanguageVersion.CSharp3 => "CS8024",
581LanguageVersion.CSharp4 => "CS8025",
582LanguageVersion.CSharp5 => "CS8026",
583LanguageVersion.CSharp6 => "CS8059",
584LanguageVersion.CSharp7 => "CS8107",
585LanguageVersion.CSharp7_1 => "CS8302",
586LanguageVersion.CSharp7_2 => "CS8320",
587LanguageVersion.CSharp7_3 => "CS8370",
ExtractClass\ExtractClassTests.cs (21)
52var unusedParseOptions = new CSharpParseOptions(LanguageVersion.CSharp1);
243LanguageVersion = LanguageVersion.CSharp9,
287LanguageVersion = LanguageVersion.CSharp12,
328LanguageVersion = LanguageVersion.CSharp9,
369LanguageVersion = LanguageVersion.CSharp9,
408LanguageVersion = LanguageVersion.CSharp12,
434LanguageVersion = LanguageVersion.CSharp9,
451LanguageVersion = LanguageVersion.CSharp12,
466LanguageVersion = LanguageVersion.CSharp12,
483LanguageVersion = LanguageVersion.CSharp12,
498LanguageVersion = LanguageVersion.CSharp12,
518LanguageVersion = LanguageVersion.CSharp10,
538LanguageVersion = LanguageVersion.CSharp12,
642LanguageVersion = LanguageVersion.CSharp10,
699LanguageVersion = LanguageVersion.CSharp9,
756LanguageVersion = LanguageVersion.CSharp10,
1281LanguageVersion = LanguageVersion.CSharp10,
1355LanguageVersion = LanguageVersion.CSharp10,
1413LanguageVersion = LanguageVersion.CSharp10,
1485LanguageVersion = LanguageVersion.CSharp10,
2843LanguageVersion = LanguageVersion.CSharp10,
ExtractMethod\ExtractLocalFunctionTests.cs (17)
3575""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_3)));
3606""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)));
3637""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp8)));
3668""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest)));
4122await TestExactActionSetOfferedAsync(code, [FeaturesResources.Extract_method], new TestParameters(parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp6)));
4138await TestExactActionSetOfferedAsync(code, [FeaturesResources.Extract_method], new TestParameters(parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp5)));
5195LanguageVersion = LanguageVersion.CSharp9,
5236LanguageVersion = LanguageVersion.CSharp9,
5285LanguageVersion = LanguageVersion.CSharp9,
5338LanguageVersion = LanguageVersion.CSharp9,
5368LanguageVersion = LanguageVersion.CSharp9,
5400LanguageVersion = LanguageVersion.CSharp9,
5422await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp9));
5574await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
5623await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
5674await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
5711await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
InlineTemporary\InlineTemporaryTests.cs (15)
387[InlineData(LanguageVersion.CSharp8)]
388[InlineData(LanguageVersion.CSharp9)]
389public async Task Conversion_NonTargetTypedConditionalExpression(LanguageVersion languageVersion)
415[InlineData(LanguageVersion.CSharp8, " (int?)42")]
416[InlineData(LanguageVersion.CSharp9, " 42")] // In C# 9, target-typed conditionals makes this work
417public async Task Conversion_TargetTypedConditionalExpression(LanguageVersion languageVersion, string expectedSubstitution)
4299[InlineData(LanguageVersion.CSharp6)]
4300[InlineData(LanguageVersion.CSharp12)]
4301public async Task Tuples(LanguageVersion version)
5094await TestMissingInRegularAndScriptAsync(code, new TestParameters(parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp8)));
5669""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
5691await TestAsync(code, expected, TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
5711await TestAsync(code, expected, TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
5730TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
5810await TestInRegularAndScriptAsync(code, expected, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
IntroduceVariable\IntroduceVariableTests.cs (7)
5535await TestAsync(code, expected, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp6));
5787await TestAsync(code, expected, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest));
5820await TestAsync(code, expected, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest));
5854await TestAsync(code, expected, index: 1, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest));
6139""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest));
6169""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest), index: 0);
6198""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.Latest), index: 2);
SimplifyPropertyPattern\SimplifyPropertyPatternTests.cs (22)
45LanguageVersion = LanguageVersion.CSharp9,
84LanguageVersion = LanguageVersion.CSharp10,
110LanguageVersion = LanguageVersion.CSharp10,
135LanguageVersion = LanguageVersion.CSharp10,
160LanguageVersion = LanguageVersion.CSharp10,
185LanguageVersion = LanguageVersion.CSharp10,
210LanguageVersion = LanguageVersion.CSharp10,
235LanguageVersion = LanguageVersion.CSharp10,
274LanguageVersion = LanguageVersion.CSharp10,
311LanguageVersion = LanguageVersion.CSharp10,
348LanguageVersion = LanguageVersion.CSharp10,
385LanguageVersion = LanguageVersion.CSharp10,
422LanguageVersion = LanguageVersion.CSharp10,
459LanguageVersion = LanguageVersion.CSharp10,
496LanguageVersion = LanguageVersion.CSharp10,
533LanguageVersion = LanguageVersion.CSharp10,
583LanguageVersion = LanguageVersion.CSharp10,
632LanguageVersion = LanguageVersion.CSharp10,
671LanguageVersion = LanguageVersion.CSharp10,
723LanguageVersion = LanguageVersion.CSharp10,
746LanguageVersion = LanguageVersion.CSharp10,
768LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersTests.cs (13)
203LanguageVersion = LanguageVersion.CSharp9,
229LanguageVersion = LanguageVersion.CSharp12,
566LanguageVersion = LanguageVersion.CSharp10,
596LanguageVersion = LanguageVersion.CSharp12,
623LanguageVersion = LanguageVersion.CSharp12,
645LanguageVersion = LanguageVersion.CSharp12,
657LanguageVersion = LanguageVersion.CSharp12,
689LanguageVersion = LanguageVersion.CSharp12,
713LanguageVersion = LanguageVersion.CSharp12,
740LanguageVersion = LanguageVersion.CSharp12,
789LanguageVersion = LanguageVersion.CSharp12,
837LanguageVersion = LanguageVersion.CSharp12,
885LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (21)
46LanguageVersion = LanguageVersion.CSharp9,
67LanguageVersion = LanguageVersion.CSharp9,
84LanguageVersion = LanguageVersion.CSharp10,
106LanguageVersion = LanguageVersion.CSharp10,
133LanguageVersion = LanguageVersion.CSharp10,
160LanguageVersion = LanguageVersion.CSharp10,
189LanguageVersion = LanguageVersion.CSharp10,
216LanguageVersion = LanguageVersion.CSharp10,
245LanguageVersion = LanguageVersion.CSharp10,
272LanguageVersion = LanguageVersion.CSharp10,
306LanguageVersion = LanguageVersion.CSharp10,
339LanguageVersion = LanguageVersion.CSharp10,
364LanguageVersion = LanguageVersion.CSharp10,
388LanguageVersion = LanguageVersion.CSharp10,
413LanguageVersion = LanguageVersion.CSharp10,
437LanguageVersion = LanguageVersion.CSharp10,
465LanguageVersion = LanguageVersion.CSharp10,
495LanguageVersion = LanguageVersion.CSharp10,
523LanguageVersion = LanguageVersion.CSharp10,
552LanguageVersion = LanguageVersion.CSharp10,
582LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToFileScopedNamespaceAnalyzerTests.cs (43)
32LanguageVersion = LanguageVersion.CSharp9,
51LanguageVersion = LanguageVersion.CSharp10,
72LanguageVersion = LanguageVersion.CSharp10,
93LanguageVersion = LanguageVersion.CSharp10,
116LanguageVersion = LanguageVersion.CSharp10,
138LanguageVersion = LanguageVersion.CSharp10,
159LanguageVersion = LanguageVersion.CSharp10,
180LanguageVersion = LanguageVersion.CSharp10,
212LanguageVersion = LanguageVersion.CSharp10,
236LanguageVersion = LanguageVersion.CSharp10,
264LanguageVersion = LanguageVersion.CSharp10,
294LanguageVersion = LanguageVersion.CSharp10,
323LanguageVersion = LanguageVersion.CSharp10,
351LanguageVersion = LanguageVersion.CSharp10,
381LanguageVersion = LanguageVersion.CSharp10,
411LanguageVersion = LanguageVersion.CSharp10,
452LanguageVersion = LanguageVersion.CSharp10,
486LanguageVersion = LanguageVersion.CSharp10,
520LanguageVersion = LanguageVersion.CSharp10,
568LanguageVersion = LanguageVersion.CSharp10,
616LanguageVersion = LanguageVersion.CSharp10,
666LanguageVersion = LanguageVersion.CSharp10,
720LanguageVersion = LanguageVersion.CSharp12,
775LanguageVersion = LanguageVersion.CSharp12,
830LanguageVersion = LanguageVersion.CSharp12,
850LanguageVersion = LanguageVersion.CSharp10,
871LanguageVersion = LanguageVersion.CSharp10,
899LanguageVersion = LanguageVersion.CSharp10,
920LanguageVersion = LanguageVersion.CSharp10,
948LanguageVersion = LanguageVersion.CSharp10,
969LanguageVersion = LanguageVersion.CSharp10,
999LanguageVersion = LanguageVersion.CSharp10,
1031LanguageVersion = LanguageVersion.CSharp10,
1060LanguageVersion = LanguageVersion.CSharp10,
1090LanguageVersion = LanguageVersion.CSharp10,
1162LanguageVersion = LanguageVersion.CSharp11,
1232LanguageVersion = LanguageVersion.CSharp11,
1304LanguageVersion = LanguageVersion.CSharp11,
1390LanguageVersion = LanguageVersion.CSharp11,
1462LanguageVersion = LanguageVersion.CSharp11,
1534LanguageVersion = LanguageVersion.CSharp11,
1555LanguageVersion = LanguageVersion.CSharp10,
1576LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (41)
74LanguageVersion = LanguageVersion.CSharp12,
113LanguageVersion = LanguageVersion.CSharp12,
152LanguageVersion = LanguageVersion.CSharp12,
202LanguageVersion = LanguageVersion.CSharp9,
4060LanguageVersion = LanguageVersion.CSharp7_2,
4099LanguageVersion = LanguageVersion.CSharp8,
8318LanguageVersion = LanguageVersion.CSharp7_1,
10419LanguageVersion = LanguageVersion.CSharp9,
10545LanguageVersion = LanguageVersion.CSharp12,
10578LanguageVersion = LanguageVersion.CSharp12,
10611LanguageVersion = LanguageVersion.CSharp12,
10644LanguageVersion = LanguageVersion.CSharp12,
10681LanguageVersion = LanguageVersion.CSharp12,
10712LanguageVersion = LanguageVersion.CSharp9,
10776LanguageVersion = LanguageVersion.CSharp9,
10813LanguageVersion = LanguageVersion.CSharp9,
10850LanguageVersion = LanguageVersion.CSharp9,
11024LanguageVersion = LanguageVersion.CSharp5,
11071LanguageVersion = LanguageVersion.CSharp12,
11108LanguageVersion = LanguageVersion.CSharp12,
11145LanguageVersion = LanguageVersion.CSharp12,
11182LanguageVersion = LanguageVersion.CSharp12,
11217LanguageVersion = LanguageVersion.CSharp12,
11252LanguageVersion = LanguageVersion.CSharp12,
11294LanguageVersion = LanguageVersion.CSharp12,
11329LanguageVersion = LanguageVersion.CSharp12,
11364LanguageVersion = LanguageVersion.CSharp12,
11400LanguageVersion = LanguageVersion.CSharp12,
11436LanguageVersion = LanguageVersion.CSharp12,
11472LanguageVersion = LanguageVersion.CSharp12,
11508LanguageVersion = LanguageVersion.CSharp12,
11544LanguageVersion = LanguageVersion.CSharp12,
11580LanguageVersion = LanguageVersion.CSharp12,
11656LanguageVersion = LanguageVersion.CSharp12,
11732LanguageVersion = LanguageVersion.CSharp12,
11807LanguageVersion = LanguageVersion.CSharp7_3,
11846LanguageVersion = LanguageVersion.CSharp7_2,
11886LanguageVersion = LanguageVersion.CSharp12,
12035LanguageVersion = LanguageVersion.CSharp12,
12232LanguageVersion = LanguageVersion.CSharp9,
12277LanguageVersion = LanguageVersion.CSharp10,
src\Analyzers\CSharp\Tests\MakeMemberRequired\MakeMemberRequiredTests.cs (22)
138LanguageVersion = LanguageVersion.CSharp11,
162LanguageVersion = LanguageVersion.CSharp11,
186LanguageVersion = LanguageVersion.CSharp11,
206LanguageVersion = LanguageVersion.CSharp11,
239LanguageVersion = LanguageVersion.CSharp11,
261LanguageVersion = LanguageVersion.CSharp11,
288LanguageVersion = LanguageVersion.CSharp11,
307LanguageVersion = LanguageVersion.CSharp11,
334LanguageVersion = LanguageVersion.CSharp11,
353LanguageVersion = LanguageVersion.CSharp11,
379LanguageVersion = LanguageVersion.CSharp11,
412LanguageVersion = LanguageVersion.CSharp11,
434LanguageVersion = LanguageVersion.CSharp11,
454LanguageVersion = LanguageVersion.CSharp10,
475LanguageVersion = LanguageVersion.CSharp11,
495LanguageVersion = LanguageVersion.CSharp11,
521LanguageVersion = LanguageVersion.CSharp11,
547LanguageVersion = LanguageVersion.CSharp11,
571LanguageVersion = LanguageVersion.CSharp11,
595LanguageVersion = LanguageVersion.CSharp11,
621LanguageVersion = LanguageVersion.CSharp11,
645LanguageVersion = LanguageVersion.CSharp11,
src\Analyzers\CSharp\Tests\MakeStructMemberReadOnly\MakeStructMemberReadOnlyTests.cs (35)
458LanguageVersion = LanguageVersion.CSharp7,
999LanguageVersion = LanguageVersion.CSharp10,
1408LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1476LanguageVersion = LanguageVersion.CSharp12,
1534LanguageVersion = LanguageVersion.CSharp12,
1592LanguageVersion = LanguageVersion.CSharp12,
1650LanguageVersion = LanguageVersion.CSharp12,
1708LanguageVersion = LanguageVersion.CSharp12,
1728LanguageVersion = LanguageVersion.CSharp12,
1748LanguageVersion = LanguageVersion.CSharp12,
1768LanguageVersion = LanguageVersion.CSharp12,
1791LanguageVersion = LanguageVersion.CSharp12,
1814LanguageVersion = LanguageVersion.CSharp12,
1839LanguageVersion = LanguageVersion.CSharp12,
1880LanguageVersion = LanguageVersion.CSharp12,
1907LanguageVersion = LanguageVersion.CSharp12,
1925LanguageVersion = LanguageVersion.CSharp12,
1966LanguageVersion = LanguageVersion.CSharp12,
2007LanguageVersion = LanguageVersion.CSharp12,
2038LanguageVersion = LanguageVersion.CSharp12,
2058LanguageVersion = LanguageVersion.CSharp12,
2078LanguageVersion = LanguageVersion.CSharp12,
2105LanguageVersion = LanguageVersion.CSharp12,
2149LanguageVersion = LanguageVersion.CSharp12,
2176LanguageVersion = LanguageVersion.CSharp12,
2216LanguageVersion = LanguageVersion.CSharp12,
2264LanguageVersion = LanguageVersion.CSharp12,
2314LanguageVersion = LanguageVersion.CSharp12,
2364LanguageVersion = LanguageVersion.CSharp12,
2424LanguageVersion = LanguageVersion.CSharp12,
2460LanguageVersion = LanguageVersion.CSharp12,
2490LanguageVersion = LanguageVersion.CSharp12,
2520LanguageVersion = LanguageVersion.CSharp12,
2554LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\NewLines\MultipleBlankLines\MultipleBlankLinesTests.cs (10)
534LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
552LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
578LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
605LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
632LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
770LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
793LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
832LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
875LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
922LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (103)
5768LanguageVersion = LanguageVersion.CSharp7_1,
5793LanguageVersion = LanguageVersion.CSharp7_1,
5818LanguageVersion = LanguageVersion.CSharp7_1,
5858LanguageVersion = LanguageVersion.CSharp7_1,
5909LanguageVersion = LanguageVersion.CSharp7_1,
5934LanguageVersion = LanguageVersion.CSharp7_1,
5959LanguageVersion = LanguageVersion.CSharp7_1,
5999LanguageVersion = LanguageVersion.CSharp7_1,
6039LanguageVersion = LanguageVersion.CSharp7_1,
6060LanguageVersion = LanguageVersion.CSharp7_1,
6081LanguageVersion = LanguageVersion.CSharp7_1,
6102LanguageVersion = LanguageVersion.CSharp7_1,
6134LanguageVersion = LanguageVersion.CSharp7_1,
6157LanguageVersion = LanguageVersion.CSharp10,
6180LanguageVersion = LanguageVersion.CSharp10,
8229LanguageVersion = LanguageVersion.CSharp9,
8301LanguageVersion = LanguageVersion.CSharp8
8328LanguageVersion = LanguageVersion.CSharp9,
8349LanguageVersion = LanguageVersion.CSharp8
8376LanguageVersion = LanguageVersion.CSharp9,
8397LanguageVersion = LanguageVersion.CSharp8,
8424LanguageVersion = LanguageVersion.CSharp9,
8496LanguageVersion = LanguageVersion.CSharp8
8523LanguageVersion = LanguageVersion.CSharp9,
8544LanguageVersion = LanguageVersion.CSharp8
8571LanguageVersion = LanguageVersion.CSharp9,
8592LanguageVersion = LanguageVersion.CSharp8
8619LanguageVersion = LanguageVersion.CSharp9,
8797LanguageVersion = LanguageVersion.CSharp9,
9622LanguageVersion = LanguageVersion.CSharp9
9643LanguageVersion = LanguageVersion.CSharp9
9673LanguageVersion = LanguageVersion.CSharp9
9694LanguageVersion = LanguageVersion.CSharp9
9715LanguageVersion = LanguageVersion.CSharp9
9800LanguageVersion = LanguageVersion.CSharp9
9823LanguageVersion = LanguageVersion.CSharp9
9846LanguageVersion = LanguageVersion.CSharp9
9875LanguageVersion = LanguageVersion.CSharp9
9905LanguageVersion = LanguageVersion.CSharp9
9923LanguageVersion = LanguageVersion.CSharp9,
9946LanguageVersion = LanguageVersion.CSharp9,
9982LanguageVersion = LanguageVersion.CSharp9,
10010LanguageVersion = LanguageVersion.CSharp9,
10033LanguageVersion = LanguageVersion.CSharp9,
10055LanguageVersion = LanguageVersion.CSharp9,
10890LanguageVersion = LanguageVersion.CSharp9,
10929LanguageVersion = LanguageVersion.CSharp9,
11629LanguageVersion = LanguageVersion.CSharp10,
12067public async Task DoNotRemoveMethodGroupToSpecificDelegateType(LanguageVersion version)
12123LanguageVersion = LanguageVersion.CSharp10,
12159LanguageVersion = LanguageVersion.CSharp10,
12183LanguageVersion = LanguageVersion.CSharp10,
12205LanguageVersion = LanguageVersion.CSharp10,
12226LanguageVersion = LanguageVersion.CSharp10,
12247LanguageVersion = LanguageVersion.CSharp10,
12270LanguageVersion = LanguageVersion.CSharp10,
12292LanguageVersion = LanguageVersion.CSharp10,
12308LanguageVersion = LanguageVersion.CSharp10,
12330LanguageVersion = LanguageVersion.CSharp10,
12354LanguageVersion = LanguageVersion.CSharp10,
12373LanguageVersion = LanguageVersion.CSharp10,
12392LanguageVersion = LanguageVersion.CSharp10,
12416LanguageVersion = LanguageVersion.CSharp10,
12439LanguageVersion = LanguageVersion.CSharp10,
12470LanguageVersion = LanguageVersion.CSharp10,
12520LanguageVersion = LanguageVersion.CSharp10,
12561LanguageVersion = LanguageVersion.CSharp10,
12588LanguageVersion = LanguageVersion.CSharp10,
12635LanguageVersion = LanguageVersion.CSharp10,
12680LanguageVersion = LanguageVersion.CSharp10,
12699LanguageVersion = LanguageVersion.CSharp10,
12730LanguageVersion = LanguageVersion.CSharp10,
12761LanguageVersion = LanguageVersion.CSharp10,
12792LanguageVersion = LanguageVersion.CSharp10,
12823LanguageVersion = LanguageVersion.CSharp10,
12854LanguageVersion = LanguageVersion.CSharp10,
12885LanguageVersion = LanguageVersion.CSharp10,
12904LanguageVersion = LanguageVersion.CSharp10,
12930LanguageVersion = LanguageVersion.CSharp10,
12966LanguageVersion = LanguageVersion.CSharp10,
13001LanguageVersion = LanguageVersion.CSharp10,
13020LanguageVersion = LanguageVersion.CSharp10,
13075LanguageVersion = LanguageVersion.CSharp10,
13578LanguageVersion = LanguageVersion.CSharp12,
13596LanguageVersion = LanguageVersion.CSharp12,
13621LanguageVersion = LanguageVersion.CSharp12,
13648LanguageVersion = LanguageVersion.CSharp12,
13681LanguageVersion = LanguageVersion.CSharp12,
13704LanguageVersion = LanguageVersion.CSharp12,
13734LanguageVersion = LanguageVersion.CSharp12,
13778LanguageVersion = LanguageVersion.CSharp12,
13815LanguageVersion = LanguageVersion.CSharp12,
13893LanguageVersion = LanguageVersion.CSharp12,
13933LanguageVersion = LanguageVersion.CSharp12,
13954LanguageVersion = LanguageVersion.CSharp12,
13975LanguageVersion = LanguageVersion.CSharp12,
13994LanguageVersion = LanguageVersion.CSharp12,
14013LanguageVersion = LanguageVersion.CSharp12,
14032LanguageVersion = LanguageVersion.CSharp12,
14053LanguageVersion = LanguageVersion.CSharp12,
14074LanguageVersion = LanguageVersion.CSharp12,
14095LanguageVersion = LanguageVersion.CSharp12,
14118LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (18)
54LanguageVersion = LanguageVersion.CSharp9,
76LanguageVersion = LanguageVersion.CSharp8,
109LanguageVersion = LanguageVersion.CSharp9,
136LanguageVersion = LanguageVersion.CSharp9,
169LanguageVersion = LanguageVersion.CSharp9,
202LanguageVersion = LanguageVersion.CSharp9,
235LanguageVersion = LanguageVersion.CSharp9,
256LanguageVersion = LanguageVersion.CSharp9,
289LanguageVersion = LanguageVersion.CSharp9,
328LanguageVersion = LanguageVersion.CSharp9,
352LanguageVersion = LanguageVersion.CSharp9,
377LanguageVersion = LanguageVersion.CSharp9,
430LanguageVersion = LanguageVersion.CSharp9,
461LanguageVersion = LanguageVersion.CSharp9,
493LanguageVersion = LanguageVersion.CSharp9,
528LanguageVersion = LanguageVersion.CSharp9,
563LanguageVersion = LanguageVersion.CSharp9,
601LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.cs (13)
446LanguageVersion = LanguageVersion.CSharp9,
474LanguageVersion = LanguageVersion.CSharp9,
493LanguageVersion = LanguageVersion.CSharp9,
520LanguageVersion = LanguageVersion.CSharp9,
1176LanguageVersion = LanguageVersion.CSharp9,
3124LanguageVersion = LanguageVersion.CSharp9,
3270LanguageVersion = LanguageVersion.CSharp13,
3368LanguageVersion = LanguageVersion.CSharp13,
3402LanguageVersion = LanguageVersion.CSharp13,
3425LanguageVersion = LanguageVersion.CSharp13,
3449LanguageVersion = LanguageVersion.CSharp13,
3480LanguageVersion = LanguageVersion.CSharp13,
3529LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (61)
961LanguageVersion = LanguageVersion.CSharp6,
2728""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
2767[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
2843LanguageVersion = LanguageVersion.CSharp9,
3002""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3008[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
3071LanguageVersion = LanguageVersion.CSharp9,
3114""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3120[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
3208LanguageVersion = LanguageVersion.CSharp9,
3251""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
3374LanguageVersion = LanguageVersion.CSharp9,
5466""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9));
8229""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8245""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8269""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8293""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8313""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8464""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8470[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
8551LanguageVersion = LanguageVersion.CSharp9,
8878""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3));
8916""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8938parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
8961parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
9118""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9124[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9156""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9182""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9217LanguageVersion = LanguageVersion.CSharp9,
9228[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9256[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion)
9300""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9339LanguageVersion = LanguageVersion.CSharp9,
9712LanguageVersion = LanguageVersion.CSharp9,
9750LanguageVersion = LanguageVersion.CSharp9,
9791LanguageVersion = LanguageVersion.CSharp9,
9832LanguageVersion = LanguageVersion.CSharp9,
9873LanguageVersion = LanguageVersion.CSharp9,
9914LanguageVersion = LanguageVersion.CSharp9,
9955LanguageVersion = LanguageVersion.CSharp11,
9997LanguageVersion = LanguageVersion.CSharp11,
10039LanguageVersion = LanguageVersion.CSharp11,
10062LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (25)
24private static readonly ImmutableArray<LanguageVersion> s_csharp7_1above =
25[LanguageVersion.CSharp7_1, LanguageVersion.Latest];
27private static readonly ImmutableArray<LanguageVersion> s_csharp7below =
29LanguageVersion.CSharp7,
30LanguageVersion.CSharp6,
31LanguageVersion.CSharp5,
32LanguageVersion.CSharp4,
33LanguageVersion.CSharp3,
34LanguageVersion.CSharp2,
35LanguageVersion.CSharp1,
38private async Task TestWithLanguageVersionsAsync(string initialMarkup, string expectedMarkup, ImmutableArray<LanguageVersion> versions)
40foreach (var version in versions)
47private async Task TestMissingWithLanguageVersionsAsync(string initialMarkup, ImmutableArray<LanguageVersion> versions)
49foreach (var version in versions)
808""", [LanguageVersion.CSharp7_1, LanguageVersion.CSharp10, LanguageVersion.CSharp11, LanguageVersion.Latest]);
863""", [LanguageVersion.CSharp7_1, LanguageVersion.CSharp10, LanguageVersion.CSharp11, LanguageVersion.Latest]);
953""", [LanguageVersion.CSharp7_1]);
979""", [LanguageVersion.Latest]);
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (111)
33LanguageVersion expected,
77LanguageVersion.CSharp8,
78new CSharpParseOptions(LanguageVersion.CSharp7_2));
91LanguageVersion.CSharp8,
92new CSharpParseOptions(LanguageVersion.CSharp7));
108LanguageVersion.CSharp7,
109new CSharpParseOptions(LanguageVersion.CSharp6));
125LanguageVersion.CSharp6,
126new CSharpParseOptions(LanguageVersion.CSharp5));
142LanguageVersion.CSharp5,
143new CSharpParseOptions(LanguageVersion.CSharp4));
153#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
156LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
157new CSharpParseOptions(LanguageVersion.CSharp7));
190LanguageVersion.CSharp7_1,
191new CSharpParseOptions(LanguageVersion.CSharp7));
201#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
204LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
205new CSharpParseOptions(LanguageVersion.CSharp7_1));
218LanguageVersion.CSharp7_1,
219new CSharpParseOptions(LanguageVersion.CSharp7));
235LanguageVersion.CSharp7_2,
236new CSharpParseOptions(LanguageVersion.CSharp7_1));
254LanguageVersion.CSharp7_1,
255new CSharpParseOptions(LanguageVersion.CSharp7));
266#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
269LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
270new CSharpParseOptions(LanguageVersion.CSharp7_2));
285LanguageVersion.CSharp7_3,
286new CSharpParseOptions(LanguageVersion.CSharp7_2));
298LanguageVersion.CSharp7_3,
299new CSharpParseOptions(LanguageVersion.CSharp7_2));
311LanguageVersion.CSharp7_3,
312new CSharpParseOptions(LanguageVersion.CSharp7_2));
324LanguageVersion.CSharp7_3,
325new CSharpParseOptions(LanguageVersion.CSharp7_2));
337#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|]
340LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
341new CSharpParseOptions(LanguageVersion.CSharp7_3));
351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|]
354LanguageVersion.Latest.MapSpecifiedToEffectiveVersion(),
355new CSharpParseOptions(LanguageVersion.CSharp7_3));
371expected: LanguageVersion.CSharp8,
372new CSharpParseOptions(LanguageVersion.CSharp7_3));
401LanguageVersion.CSharp7,
428LanguageVersion.CSharp8,
459LanguageVersion.CSharp8,
485LanguageVersion.CSharp9,
610var defaultVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
664var defaultEffectiveVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
702LanguageVersion.CSharp9,
703new CSharpParseOptions(LanguageVersion.CSharp8));
715LanguageVersion.CSharp7_3,
716new CSharpParseOptions(LanguageVersion.CSharp7));
748LanguageVersion.CSharp7_3,
749new CSharpParseOptions(LanguageVersion.CSharp7));
777LanguageVersion.CSharp7_3,
778new CSharpParseOptions(LanguageVersion.CSharp7));
811LanguageVersion.CSharp7_3,
812new CSharpParseOptions(LanguageVersion.CSharp7));
848expected: LanguageVersion.CSharp8,
849new CSharpParseOptions(LanguageVersion.CSharp7_3));
877new CSharpParseOptions(LanguageVersion.CSharp7_3));
890LanguageVersion.CSharp8,
891new CSharpParseOptions(LanguageVersion.CSharp7_3));
904LanguageVersion.CSharp8,
905new CSharpParseOptions(LanguageVersion.CSharp7_3));
918LanguageVersion.CSharp8,
919new CSharpParseOptions(LanguageVersion.CSharp7_3));
931LanguageVersion.CSharp8,
932new CSharpParseOptions(LanguageVersion.CSharp7_3));
964LanguageVersion.CSharp8,
965new CSharpParseOptions(LanguageVersion.CSharp7_3));
993LanguageVersion.CSharp8,
994new CSharpParseOptions(LanguageVersion.CSharp7_3));
1027LanguageVersion.CSharp8,
1028new CSharpParseOptions(LanguageVersion.CSharp7_3));
1064expected: LanguageVersion.CSharp9,
1065new CSharpParseOptions(LanguageVersion.CSharp8));
1090expected: LanguageVersion.CSharp10,
1091new CSharpParseOptions(LanguageVersion.CSharp9));
1101LanguageVersion.CSharp12,
1102new CSharpParseOptions(LanguageVersion.CSharp11));
1112LanguageVersion.CSharp12,
1113new CSharpParseOptions(LanguageVersion.CSharp11));
1123LanguageVersion.CSharp12,
1124new CSharpParseOptions(LanguageVersion.CSharp11));
1134LanguageVersion.CSharp12,
1135new CSharpParseOptions(LanguageVersion.CSharp11));
1145LanguageVersion.CSharp12,
1146new CSharpParseOptions(LanguageVersion.CSharp11));
1156LanguageVersion.CSharp12,
1157new CSharpParseOptions(LanguageVersion.CSharp11));
1169LanguageVersion.CSharp9,
1170new CSharpParseOptions(LanguageVersion.CSharp8));
1179LanguageVersion.CSharp10,
1180new CSharpParseOptions(LanguageVersion.CSharp9));
1198expected: LanguageVersion.CSharp10,
1199new CSharpParseOptions(LanguageVersion.CSharp9));
1214expected: LanguageVersion.CSharp9,
1215new CSharpParseOptions(LanguageVersion.CSharp8));
1232expected: LanguageVersion.CSharp11,
1233new CSharpParseOptions(LanguageVersion.CSharp8));
1246expected: LanguageVersion.CSharp11,
1247new CSharpParseOptions(LanguageVersion.CSharp10));
1260expected: LanguageVersion.CSharp11,
1261new CSharpParseOptions(LanguageVersion.CSharp10));
1274expected: LanguageVersion.CSharp11,
1275new CSharpParseOptions(LanguageVersion.CSharp10));
1291expected: LanguageVersion.CSharp12,
1292new CSharpParseOptions(LanguageVersion.CSharp11));
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForArrayTests.cs (26)
35LanguageVersion = LanguageVersion.CSharp11,
56LanguageVersion = LanguageVersion.CSharp12,
77LanguageVersion = LanguageVersion.CSharp12,
98LanguageVersion = LanguageVersion.CSharp12,
123LanguageVersion = LanguageVersion.CSharp12,
148LanguageVersion = LanguageVersion.CSharp12,
169LanguageVersion = LanguageVersion.CSharp12,
190LanguageVersion = LanguageVersion.CSharp12,
205LanguageVersion = LanguageVersion.CSharp12,
230LanguageVersion = LanguageVersion.CSharp12,
251LanguageVersion = LanguageVersion.CSharp12,
278LanguageVersion = LanguageVersion.CSharp12,
299LanguageVersion = LanguageVersion.CSharp12,
320LanguageVersion = LanguageVersion.CSharp12,
341LanguageVersion = LanguageVersion.CSharp12,
356LanguageVersion = LanguageVersion.CSharp12,
371LanguageVersion = LanguageVersion.CSharp12,
386LanguageVersion = LanguageVersion.CSharp12,
407LanguageVersion = LanguageVersion.CSharp12,
422LanguageVersion = LanguageVersion.CSharp12,
447LanguageVersion = LanguageVersion.CSharp12,
474LanguageVersion = LanguageVersion.CSharp12,
489LanguageVersion = LanguageVersion.CSharp12,
510LanguageVersion = LanguageVersion.CSharp12,
529LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForBuilderTests.cs (44)
84LanguageVersion = LanguageVersion.CSharp11,
107LanguageVersion = LanguageVersion.CSharp12,
141LanguageVersion = LanguageVersion.CSharp12,
175LanguageVersion = LanguageVersion.CSharp12,
199LanguageVersion = LanguageVersion.CSharp12,
237LanguageVersion = LanguageVersion.CSharp12,
275LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
351LanguageVersion = LanguageVersion.CSharp12,
377LanguageVersion = LanguageVersion.CSharp12,
401LanguageVersion = LanguageVersion.CSharp12,
442LanguageVersion = LanguageVersion.CSharp12,
485LanguageVersion = LanguageVersion.CSharp12,
515LanguageVersion = LanguageVersion.CSharp12,
545LanguageVersion = LanguageVersion.CSharp12,
592LanguageVersion = LanguageVersion.CSharp12,
639LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
726LanguageVersion = LanguageVersion.CSharp12,
768LanguageVersion = LanguageVersion.CSharp12,
810LanguageVersion = LanguageVersion.CSharp12,
856LanguageVersion = LanguageVersion.CSharp12,
894LanguageVersion = LanguageVersion.CSharp12,
932LanguageVersion = LanguageVersion.CSharp12,
970LanguageVersion = LanguageVersion.CSharp12,
995LanguageVersion = LanguageVersion.CSharp12,
1034LanguageVersion = LanguageVersion.CSharp12,
1072LanguageVersion = LanguageVersion.CSharp12,
1110LanguageVersion = LanguageVersion.CSharp12,
1148LanguageVersion = LanguageVersion.CSharp12,
1186LanguageVersion = LanguageVersion.CSharp12,
1212LanguageVersion = LanguageVersion.CSharp12,
1238LanguageVersion = LanguageVersion.CSharp12,
1278LanguageVersion = LanguageVersion.CSharp12,
1317LanguageVersion = LanguageVersion.CSharp12,
1360LanguageVersion = LanguageVersion.CSharp12,
1383LanguageVersion = LanguageVersion.CSharp12,
1405LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1482LanguageVersion = LanguageVersion.CSharp12,
1521LanguageVersion = LanguageVersion.CSharp12,
1559LanguageVersion = LanguageVersion.CSharp12,
1584LanguageVersion = LanguageVersion.CSharp12,
1625LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForCreateTests.cs (52)
77LanguageVersion = LanguageVersion.CSharp11,
99LanguageVersion = LanguageVersion.CSharp12,
121LanguageVersion = LanguageVersion.CSharp12,
149LanguageVersion = LanguageVersion.CSharp12,
170LanguageVersion = LanguageVersion.CSharp12,
192LanguageVersion = LanguageVersion.CSharp12,
214LanguageVersion = LanguageVersion.CSharp12,
236LanguageVersion = LanguageVersion.CSharp12,
258LanguageVersion = LanguageVersion.CSharp12,
280LanguageVersion = LanguageVersion.CSharp12,
296LanguageVersion = LanguageVersion.CSharp12,
318LanguageVersion = LanguageVersion.CSharp12,
340LanguageVersion = LanguageVersion.CSharp12,
362LanguageVersion = LanguageVersion.CSharp12,
378LanguageVersion = LanguageVersion.CSharp12,
394LanguageVersion = LanguageVersion.CSharp12,
416LanguageVersion = LanguageVersion.CSharp12,
438LanguageVersion = LanguageVersion.CSharp12,
460LanguageVersion = LanguageVersion.CSharp12,
476LanguageVersion = LanguageVersion.CSharp12,
508LanguageVersion = LanguageVersion.CSharp12,
530LanguageVersion = LanguageVersion.CSharp12,
552LanguageVersion = LanguageVersion.CSharp12,
574LanguageVersion = LanguageVersion.CSharp12,
596LanguageVersion = LanguageVersion.CSharp12,
614LanguageVersion = LanguageVersion.CSharp12,
632LanguageVersion = LanguageVersion.CSharp12,
658LanguageVersion = LanguageVersion.CSharp12,
684LanguageVersion = LanguageVersion.CSharp12,
710LanguageVersion = LanguageVersion.CSharp12,
736LanguageVersion = LanguageVersion.CSharp12,
762LanguageVersion = LanguageVersion.CSharp12,
788LanguageVersion = LanguageVersion.CSharp12,
807LanguageVersion = LanguageVersion.CSharp12,
829LanguageVersion = LanguageVersion.CSharp12,
853LanguageVersion = LanguageVersion.CSharp12,
884LanguageVersion = LanguageVersion.CSharp12,
906LanguageVersion = LanguageVersion.CSharp12,
940LanguageVersion = LanguageVersion.CSharp12,
962LanguageVersion = LanguageVersion.CSharp12,
996LanguageVersion = LanguageVersion.CSharp12,
1012LanguageVersion = LanguageVersion.CSharp12,
1040LanguageVersion = LanguageVersion.CSharp12,
1078LanguageVersion = LanguageVersion.CSharp12,
1115LanguageVersion = LanguageVersion.CSharp12,
1156LanguageVersion = LanguageVersion.CSharp12,
1181LanguageVersion = LanguageVersion.CSharp12,
1206LanguageVersion = LanguageVersion.CSharp12,
1240LanguageVersion = LanguageVersion.CSharp12,
1266LanguageVersion = LanguageVersion.CSharp12,
1284LanguageVersion = LanguageVersion.CSharp12,
1324LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForEmptyTests.cs (49)
51LanguageVersion = LanguageVersion.CSharp12,
82LanguageVersion = LanguageVersion.CSharp12,
113LanguageVersion = LanguageVersion.CSharp12,
142LanguageVersion = LanguageVersion.CSharp12,
161LanguageVersion = LanguageVersion.CSharp12,
198LanguageVersion = LanguageVersion.CSharp12,
219LanguageVersion = LanguageVersion.CSharp12,
254LanguageVersion = LanguageVersion.CSharp12,
287LanguageVersion = LanguageVersion.CSharp12,
320LanguageVersion = LanguageVersion.CSharp12,
353LanguageVersion = LanguageVersion.CSharp12,
386LanguageVersion = LanguageVersion.CSharp12,
417LanguageVersion = LanguageVersion.CSharp12,
438LanguageVersion = LanguageVersion.CSharp12,
471LanguageVersion = LanguageVersion.CSharp12,
496LanguageVersion = LanguageVersion.CSharp12,
553LanguageVersion = LanguageVersion.CSharp12,
621LanguageVersion = LanguageVersion.CSharp12,
689LanguageVersion = LanguageVersion.CSharp12,
721LanguageVersion = LanguageVersion.CSharp12,
742LanguageVersion = LanguageVersion.CSharp12,
776LanguageVersion = LanguageVersion.CSharp12,
798LanguageVersion = LanguageVersion.CSharp12,
832LanguageVersion = LanguageVersion.CSharp12,
865LanguageVersion = LanguageVersion.CSharp12,
900LanguageVersion = LanguageVersion.CSharp12,
951LanguageVersion = LanguageVersion.CSharp12,
989LanguageVersion = LanguageVersion.CSharp12,
1041LanguageVersion = LanguageVersion.CSharp12,
1094LanguageVersion = LanguageVersion.CSharp12,
1149LanguageVersion = LanguageVersion.CSharp12,
1187LanguageVersion = LanguageVersion.CSharp12,
1244LanguageVersion = LanguageVersion.CSharp12,
1268LanguageVersion = LanguageVersion.CSharp12,
1288LanguageVersion = LanguageVersion.CSharp12,
1315LanguageVersion = LanguageVersion.CSharp12,
1352LanguageVersion = LanguageVersion.CSharp12,
1382LanguageVersion = LanguageVersion.CSharp12,
1412LanguageVersion = LanguageVersion.CSharp12,
1442LanguageVersion = LanguageVersion.CSharp12,
1472LanguageVersion = LanguageVersion.CSharp12,
1508LanguageVersion = LanguageVersion.CSharp12,
1548LanguageVersion = LanguageVersion.CSharp12,
1586LanguageVersion = LanguageVersion.CSharp12,
1609LanguageVersion = LanguageVersion.CSharp12,
1632LanguageVersion = LanguageVersion.CSharp12,
1669LanguageVersion = LanguageVersion.CSharp12,
1694LanguageVersion = LanguageVersion.CSharp12,
1716LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForFluentTests.cs (92)
39LanguageVersion = LanguageVersion.CSharp11,
73LanguageVersion = LanguageVersion.CSharp12,
107LanguageVersion = LanguageVersion.CSharp12,
141LanguageVersion = LanguageVersion.CSharp12,
164LanguageVersion = LanguageVersion.CSharp12,
198LanguageVersion = LanguageVersion.CSharp12,
232LanguageVersion = LanguageVersion.CSharp12,
254LanguageVersion = LanguageVersion.CSharp12,
290LanguageVersion = LanguageVersion.CSharp12,
326LanguageVersion = LanguageVersion.CSharp12,
362LanguageVersion = LanguageVersion.CSharp12,
398LanguageVersion = LanguageVersion.CSharp12,
434LanguageVersion = LanguageVersion.CSharp12,
470LanguageVersion = LanguageVersion.CSharp12,
506LanguageVersion = LanguageVersion.CSharp12,
542LanguageVersion = LanguageVersion.CSharp12,
578LanguageVersion = LanguageVersion.CSharp12,
614LanguageVersion = LanguageVersion.CSharp12,
650LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
709LanguageVersion = LanguageVersion.CSharp12,
732LanguageVersion = LanguageVersion.CSharp12,
755LanguageVersion = LanguageVersion.CSharp12,
795LanguageVersion = LanguageVersion.CSharp12,
831LanguageVersion = LanguageVersion.CSharp12,
854LanguageVersion = LanguageVersion.CSharp12,
898LanguageVersion = LanguageVersion.CSharp12,
934LanguageVersion = LanguageVersion.CSharp12,
957LanguageVersion = LanguageVersion.CSharp12,
993LanguageVersion = LanguageVersion.CSharp12,
1029LanguageVersion = LanguageVersion.CSharp12,
1071LanguageVersion = LanguageVersion.CSharp12,
1118LanguageVersion = LanguageVersion.CSharp12,
1160LanguageVersion = LanguageVersion.CSharp12,
1207LanguageVersion = LanguageVersion.CSharp12,
1233LanguageVersion = LanguageVersion.CSharp12,
1259LanguageVersion = LanguageVersion.CSharp12,
1285LanguageVersion = LanguageVersion.CSharp12,
1310LanguageVersion = LanguageVersion.CSharp12,
1335LanguageVersion = LanguageVersion.CSharp12,
1371LanguageVersion = LanguageVersion.CSharp12,
1407LanguageVersion = LanguageVersion.CSharp12,
1443LanguageVersion = LanguageVersion.CSharp12,
1481LanguageVersion = LanguageVersion.CSharp12,
1519LanguageVersion = LanguageVersion.CSharp12,
1543LanguageVersion = LanguageVersion.CSharp12,
1570LanguageVersion = LanguageVersion.CSharp12,
1608LanguageVersion = LanguageVersion.CSharp12,
1646LanguageVersion = LanguageVersion.CSharp12,
1684LanguageVersion = LanguageVersion.CSharp12,
1728LanguageVersion = LanguageVersion.CSharp12,
1772LanguageVersion = LanguageVersion.CSharp12,
1810LanguageVersion = LanguageVersion.CSharp12,
1848LanguageVersion = LanguageVersion.CSharp12,
1894LanguageVersion = LanguageVersion.CSharp12,
1939LanguageVersion = LanguageVersion.CSharp12,
1973LanguageVersion = LanguageVersion.CSharp12,
1995LanguageVersion = LanguageVersion.CSharp12,
2031LanguageVersion = LanguageVersion.CSharp12,
2079LanguageVersion = LanguageVersion.CSharp12,
2114LanguageVersion = LanguageVersion.CSharp12,
2149LanguageVersion = LanguageVersion.CSharp12,
2183LanguageVersion = LanguageVersion.CSharp12,
2206LanguageVersion = LanguageVersion.CSharp12,
2242LanguageVersion = LanguageVersion.CSharp12,
2265LanguageVersion = LanguageVersion.CSharp12,
2301LanguageVersion = LanguageVersion.CSharp12,
2324LanguageVersion = LanguageVersion.CSharp12,
2360LanguageVersion = LanguageVersion.CSharp12,
2398LanguageVersion = LanguageVersion.CSharp12,
2432LanguageVersion = LanguageVersion.CSharp12,
2466LanguageVersion = LanguageVersion.CSharp12,
2501LanguageVersion = LanguageVersion.CSharp12,
2536LanguageVersion = LanguageVersion.CSharp12,
2573LanguageVersion = LanguageVersion.CSharp12,
2610LanguageVersion = LanguageVersion.CSharp12,
2650LanguageVersion = LanguageVersion.CSharp12,
2674LanguageVersion = LanguageVersion.CSharp12,
2698LanguageVersion = LanguageVersion.CSharp12,
2726LanguageVersion = LanguageVersion.CSharp12,
2777LanguageVersion = LanguageVersion.CSharp12,
2810LanguageVersion = LanguageVersion.CSharp12,
2832LanguageVersion = LanguageVersion.CSharp12,
2872LanguageVersion = LanguageVersion.CSharp12,
2908LanguageVersion = LanguageVersion.CSharp12,
2935LanguageVersion = LanguageVersion.CSharp12,
2978LanguageVersion = LanguageVersion.CSharp12,
3012LanguageVersion = LanguageVersion.CSharp12,
3046LanguageVersion = LanguageVersion.CSharp12,
3080LanguageVersion = LanguageVersion.CSharp12,
3114LanguageVersion = LanguageVersion.CSharp12,
3150LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionExpression\UseCollectionExpressionForStackAllocTests.cs (56)
38LanguageVersion = LanguageVersion.CSharp11,
59LanguageVersion = LanguageVersion.CSharp11,
80LanguageVersion = LanguageVersion.CSharp12,
101LanguageVersion = LanguageVersion.CSharp12,
133LanguageVersion = LanguageVersion.CSharp12,
165LanguageVersion = LanguageVersion.CSharp12,
197LanguageVersion = LanguageVersion.CSharp12,
229LanguageVersion = LanguageVersion.CSharp12,
250LanguageVersion = LanguageVersion.CSharp12,
271LanguageVersion = LanguageVersion.CSharp12,
292LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
347LanguageVersion = LanguageVersion.CSharp12,
368LanguageVersion = LanguageVersion.CSharp12,
389LanguageVersion = LanguageVersion.CSharp12,
410LanguageVersion = LanguageVersion.CSharp12,
431LanguageVersion = LanguageVersion.CSharp12,
467LanguageVersion = LanguageVersion.CSharp12,
503LanguageVersion = LanguageVersion.CSharp12,
535LanguageVersion = LanguageVersion.CSharp12,
567LanguageVersion = LanguageVersion.CSharp12,
589LanguageVersion = LanguageVersion.CSharp12,
621LanguageVersion = LanguageVersion.CSharp12,
642LanguageVersion = LanguageVersion.CSharp12,
674LanguageVersion = LanguageVersion.CSharp12,
695LanguageVersion = LanguageVersion.CSharp12,
717LanguageVersion = LanguageVersion.CSharp12,
741LanguageVersion = LanguageVersion.CSharp12,
763LanguageVersion = LanguageVersion.CSharp12,
785LanguageVersion = LanguageVersion.CSharp12,
809LanguageVersion = LanguageVersion.CSharp12,
833LanguageVersion = LanguageVersion.CSharp12,
855LanguageVersion = LanguageVersion.CSharp12,
877LanguageVersion = LanguageVersion.CSharp12,
900LanguageVersion = LanguageVersion.CSharp12,
933LanguageVersion = LanguageVersion.CSharp12,
968LanguageVersion = LanguageVersion.CSharp12,
1002LanguageVersion = LanguageVersion.CSharp12,
1038LanguageVersion = LanguageVersion.CSharp12,
1061LanguageVersion = LanguageVersion.CSharp12,
1085LanguageVersion = LanguageVersion.CSharp12,
1111LanguageVersion = LanguageVersion.CSharp12,
1151LanguageVersion = LanguageVersion.CSharp12,
1191LanguageVersion = LanguageVersion.CSharp12,
1229LanguageVersion = LanguageVersion.CSharp12,
1269LanguageVersion = LanguageVersion.CSharp12,
1305LanguageVersion = LanguageVersion.CSharp12,
1343LanguageVersion = LanguageVersion.CSharp12,
1381LanguageVersion = LanguageVersion.CSharp12,
1421LanguageVersion = LanguageVersion.CSharp12,
1457LanguageVersion = LanguageVersion.CSharp12,
1495LanguageVersion = LanguageVersion.CSharp12,
1533LanguageVersion = LanguageVersion.CSharp12,
1575LanguageVersion = LanguageVersion.CSharp12,
1595LanguageVersion = LanguageVersion.CSharp12,
1631LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseCollectionInitializer\UseCollectionInitializerTests_CollectionExpression.cs (24)
31LanguageVersion = LanguageVersion.CSharp12,
375LanguageVersion = LanguageVersion.CSharp12,
798LanguageVersion = LanguageVersion.CSharp12,
823LanguageVersion = LanguageVersion.CSharp12,
1941LanguageVersion = LanguageVersion.CSharp12,
4385LanguageVersion = LanguageVersion.CSharp12,
5346LanguageVersion = LanguageVersion.CSharp12,
5386LanguageVersion = LanguageVersion.CSharp12,
5423LanguageVersion = LanguageVersion.CSharp12,
5457LanguageVersion = LanguageVersion.CSharp12,
5491LanguageVersion = LanguageVersion.CSharp12,
5525LanguageVersion = LanguageVersion.CSharp12,
5569LanguageVersion = LanguageVersion.CSharp12,
5603LanguageVersion = LanguageVersion.CSharp12,
5637LanguageVersion = LanguageVersion.CSharp12,
5681LanguageVersion = LanguageVersion.CSharp12,
5705LanguageVersion = LanguageVersion.CSharp12,
5743LanguageVersion = LanguageVersion.CSharp12,
5777LanguageVersion = LanguageVersion.CSharp12,
5811LanguageVersion = LanguageVersion.CSharp12,
5865LanguageVersion = LanguageVersion.CSharp12,
5887LanguageVersion = LanguageVersion.CSharp13,
5908LanguageVersion = LanguageVersion.CSharp13,
5940LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (13)
26LanguageVersion languageVersion = LanguageVersion.CSharp8,
42LanguageVersion languageVersion = LanguageVersion.CSharp8,
197""", LanguageVersion.CSharp6);
589""", LanguageVersion.Latest);
987""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
1019""", LanguageVersion.CSharp9, options: PreferImplicitTypeAlways);
1179""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
1211""", LanguageVersion.CSharp9, options: PreferImplicitTypeAlways);
1903""", LanguageVersion.CSharp9);
1949""", LanguageVersion.CSharp9, equivalenceKey: nameof(AnalyzersResources.Simplify_check));
2141LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (15)
22private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
163""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
977[InlineData(LanguageVersion.CSharp8, "(string)null")]
978[InlineData(LanguageVersion.CSharp9, "null")]
979public async Task TestConversion2_Throw1(LanguageVersion languageVersion, string expectedFalseExpression)
1043[InlineData(LanguageVersion.CSharp8, "(string)null")]
1044[InlineData(LanguageVersion.CSharp9, "null")]
1045public async Task TestConversion3(LanguageVersion languageVersion, string expectedFalseExpression)
1078[InlineData(LanguageVersion.CSharp8, "(string)null")]
1079[InlineData(LanguageVersion.CSharp9, "null")]
1080public async Task TestConversion3_Throw1(LanguageVersion languageVersion, string expectedFalseExpression)
1113[InlineData(LanguageVersion.CSharp8, "(string)null")]
1114[InlineData(LanguageVersion.CSharp9, "null")]
1115public async Task TestConversion3_Throw2(LanguageVersion languageVersion, string expectedTrue)
src\Analyzers\CSharp\Tests\UseExplicitArrayInExpressionTree\UseExplicitArrayInExpressionTreeTests.cs (16)
56LanguageVersion = LanguageVersion.CSharp13,
94LanguageVersion = LanguageVersion.CSharp13,
117LanguageVersion = LanguageVersion.CSharp13,
140LanguageVersion = LanguageVersion.CSharp13,
163LanguageVersion = LanguageVersion.CSharp13,
201LanguageVersion = LanguageVersion.CSharp13,
239LanguageVersion = LanguageVersion.CSharp13,
277LanguageVersion = LanguageVersion.CSharp13,
315LanguageVersion = LanguageVersion.CSharp13,
353LanguageVersion = LanguageVersion.CSharp13,
391LanguageVersion = LanguageVersion.CSharp13,
429LanguageVersion = LanguageVersion.CSharp13,
473LanguageVersion = LanguageVersion.CSharp13,
517LanguageVersion = LanguageVersion.CSharp13,
561LanguageVersion = LanguageVersion.CSharp13,
605LanguageVersion = LanguageVersion.CSharp13,
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (15)
29LanguageVersion version = LanguageVersion.CSharp8)
33ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
51LanguageVersion version = LanguageVersion.CSharp8)
55ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
71LanguageVersion version = LanguageVersion.CSharp8)
75ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default,
269await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp9);
308LanguageVersion = LanguageVersion.CSharp9,
505await TestWithUseBlockBodyIncludingPropertiesAndIndexers(code, fixedCode, LanguageVersion.CSharp9);
888LanguageVersion = LanguageVersion.CSharp9,
921await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
955await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (7)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
862await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp5);
875await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp6);
895await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
909await TestWithUseExpressionBody(code, code, LanguageVersion.CSharp6);
941await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.CSharp6);
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (44)
35LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp8,
57LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
78LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
99LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
120LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
135LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
162LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
177LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
192LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
213LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
240LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
262LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
297LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
324LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
345LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
366LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
387LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
408LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
429LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
444LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
465LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
486LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
501LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
517LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
536LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
559LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
582LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
607LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
642LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
665LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
688LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
717LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
732LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
756LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
781LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
806LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
831LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
848LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
865LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
890LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
915LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
932LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
949LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
974LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseObjectInitializer\UseObjectInitializerTests.cs (28)
25LanguageVersion? languageVersion = null)
77LanguageVersion = LanguageVersion.CSharp12,
184LanguageVersion = LanguageVersion.CSharp12,
249LanguageVersion = LanguageVersion.CSharp12,
313LanguageVersion = LanguageVersion.CSharp12,
358LanguageVersion = LanguageVersion.CSharp12,
405LanguageVersion = LanguageVersion.CSharp12,
452LanguageVersion = LanguageVersion.CSharp12,
498LanguageVersion = LanguageVersion.CSharp12,
547LanguageVersion = LanguageVersion.CSharp12,
598LanguageVersion = LanguageVersion.CSharp12,
618""", LanguageVersion.CSharp2);
679LanguageVersion = LanguageVersion.CSharp12,
735LanguageVersion = LanguageVersion.CSharp12,
792LanguageVersion = LanguageVersion.CSharp12,
837LanguageVersion = LanguageVersion.CSharp12,
889LanguageVersion = LanguageVersion.CSharp12,
990LanguageVersion = LanguageVersion.CSharp12,
1043LanguageVersion = LanguageVersion.CSharp12,
1155LanguageVersion = LanguageVersion.CSharp12,
1220LanguageVersion = LanguageVersion.CSharp12,
1257LanguageVersion = LanguageVersion.CSharp12,
1339LanguageVersion = LanguageVersion.CSharp12,
1412LanguageVersion = LanguageVersion.CSharp12,
1455LanguageVersion = LanguageVersion.CSharp12,
1502LanguageVersion = LanguageVersion.CSharp12,
1545LanguageVersion = LanguageVersion.CSharp12,
1592LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (34)
70LanguageVersion = LanguageVersion.CSharp7,
91LanguageVersion = LanguageVersion.CSharp7,
110LanguageVersion = LanguageVersion.CSharp7,
134LanguageVersion = LanguageVersion.CSharp7,
155LanguageVersion = LanguageVersion.CSharp8,
176LanguageVersion = LanguageVersion.CSharp9,
197LanguageVersion = LanguageVersion.CSharp8,
218LanguageVersion = LanguageVersion.CSharp9,
242LanguageVersion = LanguageVersion.CSharp9,
265LanguageVersion = LanguageVersion.CSharp8,
300LanguageVersion = LanguageVersion.CSharp9,
337LanguageVersion = LanguageVersion.CSharp10,
360LanguageVersion = LanguageVersion.CSharp8,
383LanguageVersion = LanguageVersion.CSharp8,
420LanguageVersion = LanguageVersion.CSharp10,
451LanguageVersion = LanguageVersion.CSharp9,
482LanguageVersion = LanguageVersion.CSharp9,
517LanguageVersion = LanguageVersion.CSharp9,
548LanguageVersion = LanguageVersion.CSharp9,
599LanguageVersion = LanguageVersion.CSharp9,
620LanguageVersion = LanguageVersion.CSharp9,
641LanguageVersion = LanguageVersion.CSharp9,
665LanguageVersion = LanguageVersion.CSharp9,
700LanguageVersion = LanguageVersion.CSharp9,
737LanguageVersion = LanguageVersion.CSharp10,
772LanguageVersion = LanguageVersion.CSharp9,
809LanguageVersion = LanguageVersion.CSharp10,
834LanguageVersion = LanguageVersion.CSharp9,
871LanguageVersion = LanguageVersion.CSharp10,
984LanguageVersion = LanguageVersion.CSharp9,
1037LanguageVersion = LanguageVersion.CSharp9,
1134LanguageVersion = LanguageVersion.CSharp9,
1155LanguageVersion = LanguageVersion.CSharp9,
1228LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (14)
42[InlineData("x == null", "o is not string x", LanguageVersion.CSharp9)]
43public async Task InlineTypeCheck1(string input, string output, LanguageVersion version = LanguageVersion.CSharp8)
59private async Task TestStatement(string input, string output, LanguageVersion version = LanguageVersion.CSharp8)
98""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
1166""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1205""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1471""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1502""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1557""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1589""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1652""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1694""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (16)
49LanguageVersion = LanguageVersion.CSharp9,
80LanguageVersion = LanguageVersion.CSharp9,
111LanguageVersion = LanguageVersion.CSharp9,
142LanguageVersion = LanguageVersion.CSharp9,
173LanguageVersion = LanguageVersion.CSharp9,
204LanguageVersion = LanguageVersion.CSharp9,
247LanguageVersion = LanguageVersion.CSharp9,
284LanguageVersion = LanguageVersion.CSharp9,
304LanguageVersion = LanguageVersion.CSharp8,
335LanguageVersion = LanguageVersion.CSharp9,
366LanguageVersion = LanguageVersion.CSharp9,
401LanguageVersion = LanguageVersion.CSharp9,
421LanguageVersion = LanguageVersion.CSharp9,
444LanguageVersion = LanguageVersion.CSharp9,
467LanguageVersion = LanguageVersion.CSharp9,
506LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePrimaryConstructor\UsePrimaryConstructorTests.cs (140)
40LanguageVersion = LanguageVersion.CSharp12,
57LanguageVersion = LanguageVersion.CSharp11,
74LanguageVersion = LanguageVersion.CSharp12,
96LanguageVersion = LanguageVersion.CSharp12,
117LanguageVersion = LanguageVersion.CSharp12,
146LanguageVersion = LanguageVersion.CSharp12,
183LanguageVersion = LanguageVersion.CSharp12,
220LanguageVersion = LanguageVersion.CSharp12,
259LanguageVersion = LanguageVersion.CSharp12,
298LanguageVersion = LanguageVersion.CSharp12,
339LanguageVersion = LanguageVersion.CSharp12,
355LanguageVersion = LanguageVersion.CSharp12,
373LanguageVersion = LanguageVersion.CSharp12,
397LanguageVersion = LanguageVersion.CSharp12,
421LanguageVersion = LanguageVersion.CSharp12,
445LanguageVersion = LanguageVersion.CSharp12,
469LanguageVersion = LanguageVersion.CSharp12,
490LanguageVersion = LanguageVersion.CSharp12,
511LanguageVersion = LanguageVersion.CSharp12,
529LanguageVersion = LanguageVersion.CSharp12,
550LanguageVersion = LanguageVersion.CSharp12,
574LanguageVersion = LanguageVersion.CSharp12,
603LanguageVersion = LanguageVersion.CSharp12,
630LanguageVersion = LanguageVersion.CSharp12,
658LanguageVersion = LanguageVersion.CSharp12,
686LanguageVersion = LanguageVersion.CSharp12,
715LanguageVersion = LanguageVersion.CSharp12,
738LanguageVersion = LanguageVersion.CSharp12,
793LanguageVersion = LanguageVersion.CSharp12,
832LanguageVersion = LanguageVersion.CSharp12,
871LanguageVersion = LanguageVersion.CSharp12,
910LanguageVersion = LanguageVersion.CSharp12,
951LanguageVersion = LanguageVersion.CSharp12,
994LanguageVersion = LanguageVersion.CSharp12,
1037LanguageVersion = LanguageVersion.CSharp12,
1059LanguageVersion = LanguageVersion.CSharp12,
1081LanguageVersion = LanguageVersion.CSharp12,
1111LanguageVersion = LanguageVersion.CSharp12,
1147LanguageVersion = LanguageVersion.CSharp12,
1187LanguageVersion = LanguageVersion.CSharp12,
1217LanguageVersion = LanguageVersion.CSharp12,
1265LanguageVersion = LanguageVersion.CSharp12,
1309LanguageVersion = LanguageVersion.CSharp12,
1349LanguageVersion = LanguageVersion.CSharp12,
1398LanguageVersion = LanguageVersion.CSharp12,
1445LanguageVersion = LanguageVersion.CSharp12,
1487LanguageVersion = LanguageVersion.CSharp12,
1529LanguageVersion = LanguageVersion.CSharp12,
1577LanguageVersion = LanguageVersion.CSharp12,
1625LanguageVersion = LanguageVersion.CSharp12,
1672LanguageVersion = LanguageVersion.CSharp12,
1721LanguageVersion = LanguageVersion.CSharp12,
1754LanguageVersion = LanguageVersion.CSharp12,
1786LanguageVersion = LanguageVersion.CSharp12,
1827LanguageVersion = LanguageVersion.CSharp12,
1886LanguageVersion = LanguageVersion.CSharp12,
1914LanguageVersion = LanguageVersion.CSharp12,
1942LanguageVersion = LanguageVersion.CSharp12,
1976LanguageVersion = LanguageVersion.CSharp12,
2012LanguageVersion = LanguageVersion.CSharp12,
2049LanguageVersion = LanguageVersion.CSharp12,
2088LanguageVersion = LanguageVersion.CSharp12,
2120LanguageVersion = LanguageVersion.CSharp12,
2155LanguageVersion = LanguageVersion.CSharp12,
2183LanguageVersion = LanguageVersion.CSharp12,
2217LanguageVersion = LanguageVersion.CSharp12,
2247LanguageVersion = LanguageVersion.CSharp12,
2283LanguageVersion = LanguageVersion.CSharp12,
2311LanguageVersion = LanguageVersion.CSharp12,
2345LanguageVersion = LanguageVersion.CSharp12,
2375LanguageVersion = LanguageVersion.CSharp12,
2411LanguageVersion = LanguageVersion.CSharp12,
2440LanguageVersion = LanguageVersion.CSharp12,
2473LanguageVersion = LanguageVersion.CSharp12,
2502LanguageVersion = LanguageVersion.CSharp12,
2535LanguageVersion = LanguageVersion.CSharp12,
2565LanguageVersion = LanguageVersion.CSharp12,
2586LanguageVersion = LanguageVersion.CSharp12,
2612LanguageVersion = LanguageVersion.CSharp12,
2638LanguageVersion = LanguageVersion.CSharp12,
2660LanguageVersion = LanguageVersion.CSharp12,
2682LanguageVersion = LanguageVersion.CSharp12,
2706LanguageVersion = LanguageVersion.CSharp12,
2730LanguageVersion = LanguageVersion.CSharp12,
2754LanguageVersion = LanguageVersion.CSharp12,
2778LanguageVersion = LanguageVersion.CSharp12,
2804LanguageVersion = LanguageVersion.CSharp12,
2830LanguageVersion = LanguageVersion.CSharp12,
2863LanguageVersion = LanguageVersion.CSharp12,
2904LanguageVersion = LanguageVersion.CSharp12,
2936LanguageVersion = LanguageVersion.CSharp12,
2968LanguageVersion = LanguageVersion.CSharp12,
2996LanguageVersion = LanguageVersion.CSharp12,
3024LanguageVersion = LanguageVersion.CSharp12,
3052LanguageVersion = LanguageVersion.CSharp12,
3129LanguageVersion = LanguageVersion.CSharp12,
3167LanguageVersion = LanguageVersion.CSharp12,
3212LanguageVersion = LanguageVersion.CSharp12,
3250LanguageVersion = LanguageVersion.CSharp12,
3292LanguageVersion = LanguageVersion.CSharp12,
3321LanguageVersion = LanguageVersion.CSharp12,
3343LanguageVersion = LanguageVersion.CSharp12,
3370LanguageVersion = LanguageVersion.CSharp12,
3391LanguageVersion = LanguageVersion.CSharp12,
3420LanguageVersion = LanguageVersion.CSharp12,
3442LanguageVersion = LanguageVersion.CSharp12,
3468LanguageVersion = LanguageVersion.CSharp12,
3497LanguageVersion = LanguageVersion.CSharp12,
3526LanguageVersion = LanguageVersion.CSharp12,
3555LanguageVersion = LanguageVersion.CSharp12,
3584LanguageVersion = LanguageVersion.CSharp12,
3606LanguageVersion = LanguageVersion.CSharp12,
3628LanguageVersion = LanguageVersion.CSharp12,
3645LanguageVersion = LanguageVersion.CSharp12,
3692LanguageVersion = LanguageVersion.CSharp12,
3728LanguageVersion = LanguageVersion.CSharp12,
3765LanguageVersion = LanguageVersion.CSharp12,
3791LanguageVersion = LanguageVersion.CSharp12,
3813LanguageVersion = LanguageVersion.CSharp12,
3839LanguageVersion = LanguageVersion.CSharp12,
3869LanguageVersion = LanguageVersion.CSharp12,
3912LanguageVersion = LanguageVersion.CSharp12,
3955LanguageVersion = LanguageVersion.CSharp12,
3998LanguageVersion = LanguageVersion.CSharp12,
4027LanguageVersion = LanguageVersion.CSharp12,
4070LanguageVersion = LanguageVersion.CSharp12,
4100LanguageVersion = LanguageVersion.CSharp12,
4126LanguageVersion = LanguageVersion.CSharp12,
4159LanguageVersion = LanguageVersion.CSharp12,
4188LanguageVersion = LanguageVersion.CSharp12,
4220LanguageVersion = LanguageVersion.CSharp12,
4249LanguageVersion = LanguageVersion.CSharp12,
4280LanguageVersion = LanguageVersion.CSharp12,
4308LanguageVersion = LanguageVersion.CSharp12,
4341LanguageVersion = LanguageVersion.CSharp12,
4371LanguageVersion = LanguageVersion.CSharp12,
4405LanguageVersion = LanguageVersion.CSharp12,
4436LanguageVersion = LanguageVersion.CSharp12,
4468LanguageVersion = LanguageVersion.CSharp12,
4503LanguageVersion = LanguageVersion.CSharp12,
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (45)
64LanguageVersion = LanguageVersion.CSharp13,
87LanguageVersion = LanguageVersion.CSharp12,
110LanguageVersion = LanguageVersion.CSharp12,
133LanguageVersion = LanguageVersion.CSharp12,
171LanguageVersion = LanguageVersion.CSharp13,
209LanguageVersion = LanguageVersion.CSharp13,
232LanguageVersion = LanguageVersion.CSharp13,
255LanguageVersion = LanguageVersion.CSharp13,
280LanguageVersion = LanguageVersion.CSharp13,
303LanguageVersion = LanguageVersion.CSharp13,
343LanguageVersion = LanguageVersion.CSharp13,
381LanguageVersion = LanguageVersion.CSharp13,
422LanguageVersion = LanguageVersion.CSharp13,
460LanguageVersion = LanguageVersion.CSharp13,
486LanguageVersion = LanguageVersion.CSharp13,
531LanguageVersion = LanguageVersion.CSharp13,
584LanguageVersion = LanguageVersion.CSharp13,
604LanguageVersion = LanguageVersion.CSharp13,
631LanguageVersion = LanguageVersion.CSharp13,
656LanguageVersion = LanguageVersion.CSharp13,
679LanguageVersion = LanguageVersion.CSharp13,
702LanguageVersion = LanguageVersion.CSharp13,
725LanguageVersion = LanguageVersion.CSharp13,
753LanguageVersion = LanguageVersion.CSharp13,
781LanguageVersion = LanguageVersion.CSharp13,
804LanguageVersion = LanguageVersion.CSharp13,
827LanguageVersion = LanguageVersion.CSharp13,
873LanguageVersion = LanguageVersion.CSharp13,
921LanguageVersion = LanguageVersion.CSharp13,
959LanguageVersion = LanguageVersion.CSharp13,
997LanguageVersion = LanguageVersion.CSharp13,
1035LanguageVersion = LanguageVersion.CSharp13,
1073LanguageVersion = LanguageVersion.CSharp13,
1121LanguageVersion = LanguageVersion.CSharp13,
1169LanguageVersion = LanguageVersion.CSharp13,
1217LanguageVersion = LanguageVersion.CSharp13,
1265LanguageVersion = LanguageVersion.CSharp13,
1321LanguageVersion = LanguageVersion.CSharp13,
1377LanguageVersion = LanguageVersion.CSharp13,
1417LanguageVersion = LanguageVersion.CSharp13,
1438LanguageVersion = LanguageVersion.CSharp13,
1478LanguageVersion = LanguageVersion.CSharp13,
1524LanguageVersion = LanguageVersion.CSharp13,
1568LanguageVersion = LanguageVersion.CSharp13,
1612LanguageVersion = LanguageVersion.CSharp13,
UseNameofInAttribute\UseNameofInAttributeTests.cs (14)
44LanguageVersion = LanguageVersion.CSharp11,
72LanguageVersion = LanguageVersion.CSharp11,
100LanguageVersion = LanguageVersion.CSharp11,
128LanguageVersion = LanguageVersion.CSharp11,
156LanguageVersion = LanguageVersion.CSharp11,
177LanguageVersion = LanguageVersion.CSharp10,
198LanguageVersion = LanguageVersion.CSharp11,
219LanguageVersion = LanguageVersion.CSharp11,
240LanguageVersion = LanguageVersion.CSharp11,
266LanguageVersion = LanguageVersion.CSharp11,
312LanguageVersion = LanguageVersion.CSharp11,
362LanguageVersion = LanguageVersion.CSharp11,
388LanguageVersion = LanguageVersion.CSharp11,
414LanguageVersion = LanguageVersion.CSharp11,
UseRecursivePatterns\UseRecursivePatternsRefactoringTests.cs (12)
25LanguageVersion languageVersion = LanguageVersion.CSharp9)
80[InlineData("a.b.c.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
81[InlineData("a?.b.c.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
82[InlineData("a.b?.c.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
83[InlineData("a.b.c?.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
84[InlineData("a.b?.c?.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
85[InlineData("a?.b.c?.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
86[InlineData("a?.b?.c.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
87[InlineData("a?.b?.c?.d && b", "this is { a.b.c.d: n, b: n }", LanguageVersion.CSharp10)]
98public async Task TestLogicalAndExpression_Receiver(string actual, string expected, LanguageVersion languageVersion = LanguageVersion.CSharp9)