795 references to CSharp9
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
571return LanguageVersion.CSharp9;
LanguageVersion.cs (4)
289case LanguageVersion.CSharp9: 327case LanguageVersion.CSharp9: 400case LanguageVersion.CSharp9: 508result = LanguageVersion.CSharp9;
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9 ||
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
36var analyzer = new Analyzer(supportsOrPatterns: semanticModel.SyntaxTree.Options.LanguageVersion() >= LanguageVersion.CSharp9);
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
32if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
44if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
36if (compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
60if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
42if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\UsePatternMatchingHelpers.cs (1)
78requiredLanguageVersion = (LanguageVersion)Math.Max((int)requiredLanguageVersion, (int)LanguageVersion.CSharp9);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
58=> options.LanguageVersion() >= LanguageVersion.CSharp9; 64=> options.LanguageVersion() >= LanguageVersion.CSharp9; 1488=> options.LanguageVersion() >= LanguageVersion.CSharp9;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1547if (originalSemanticModel.Compilation.LanguageVersion() < LanguageVersion.CSharp9 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
839=> originalExpression.GetLanguageVersion() >= LanguageVersion.CSharp9;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
101parent.SyntaxTree.Options.LanguageVersion() >= LanguageVersion.CSharp9)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\UseIsNullCheckHelpers.cs (1)
26=> options.LanguageVersion() >= LanguageVersion.CSharp9;
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
172if (languageVersion >= LanguageVersion.CSharp9)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (237)
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersTests.cs (1)
203LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (3)
2810""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2920""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2962""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (2)
46LanguageVersion = LanguageVersion.CSharp9, 67LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToFileScopedNamespaceAnalyzerTests.cs (1)
32LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionTests.cs (5)
27private static readonly LanguageVersion CSharp9 = LanguageVersion.CSharp9; 2163LanguageVersion = LanguageVersion.CSharp9, 2207LanguageVersion = LanguageVersion.CSharp9, 2530LanguageVersion = LanguageVersion.CSharp9, 2587LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (7)
202LanguageVersion = LanguageVersion.CSharp9, 10419LanguageVersion = LanguageVersion.CSharp9, 10712LanguageVersion = LanguageVersion.CSharp9, 10776LanguageVersion = LanguageVersion.CSharp9, 10813LanguageVersion = LanguageVersion.CSharp9, 10850LanguageVersion = LanguageVersion.CSharp9, 12232LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticTests.cs (2)
26LanguageVersion = LanguageVersion.CSharp9 84LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveConfusingSuppression\RemoveConfusingSuppressionTests.cs (2)
172LanguageVersion = LanguageVersion.CSharp9, 211LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (26)
8229LanguageVersion = LanguageVersion.CSharp9, 8328LanguageVersion = LanguageVersion.CSharp9, 8376LanguageVersion = LanguageVersion.CSharp9, 8424LanguageVersion = LanguageVersion.CSharp9, 8523LanguageVersion = LanguageVersion.CSharp9, 8571LanguageVersion = LanguageVersion.CSharp9, 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,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (17)
54LanguageVersion = LanguageVersion.CSharp9, 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\RemoveUnreachableCode\RemoveUnreachableCodeTests.cs (7)
919LanguageVersion = LanguageVersion.CSharp9, 942LanguageVersion = LanguageVersion.CSharp9, 967LanguageVersion = LanguageVersion.CSharp9, 998LanguageVersion = LanguageVersion.CSharp9, 1026LanguageVersion = LanguageVersion.CSharp9, 1053LanguageVersion = LanguageVersion.CSharp9, 1078LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.cs (6)
446LanguageVersion = LanguageVersion.CSharp9, 474LanguageVersion = LanguageVersion.CSharp9, 493LanguageVersion = LanguageVersion.CSharp9, 520LanguageVersion = LanguageVersion.CSharp9, 1176LanguageVersion = LanguageVersion.CSharp9, 3124LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (25)
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9)); 2767[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 2843LanguageVersion = LanguageVersion.CSharp9, 3008[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3071LanguageVersion = LanguageVersion.CSharp9, 3120[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3208LanguageVersion = LanguageVersion.CSharp9, 3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9)); 3374LanguageVersion = LanguageVersion.CSharp9, 7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9)); 8470[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 8551LanguageVersion = LanguageVersion.CSharp9, 8938parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 8961parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 9124[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9217LanguageVersion = LanguageVersion.CSharp9, 9228[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9256[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9339LanguageVersion = LanguageVersion.CSharp9, 9712LanguageVersion = LanguageVersion.CSharp9, 9750LanguageVersion = LanguageVersion.CSharp9, 9791LanguageVersion = LanguageVersion.CSharp9, 9832LanguageVersion = LanguageVersion.CSharp9, 9873LanguageVersion = LanguageVersion.CSharp9, 9914LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (8)
485LanguageVersion.CSharp9, 702LanguageVersion.CSharp9, 1064expected: LanguageVersion.CSharp9, 1091new CSharpParseOptions(LanguageVersion.CSharp9)); 1169LanguageVersion.CSharp9, 1180new CSharpParseOptions(LanguageVersion.CSharp9)); 1199new CSharpParseOptions(LanguageVersion.CSharp9)); 1214expected: LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForIfNullStatementCheckTests.cs (3)
181LanguageVersion = LanguageVersion.CSharp9, 251LanguageVersion = LanguageVersion.CSharp9, 448LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (1)
959LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (5)
1019""", LanguageVersion.CSharp9, options: 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 (5)
23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9); 978[InlineData(LanguageVersion.CSharp9, "null")] 1044[InlineData(LanguageVersion.CSharp9, "null")] 1079[InlineData(LanguageVersion.CSharp9, "null")] 1114[InlineData(LanguageVersion.CSharp9, "null")]
src\Analyzers\CSharp\Tests\UseDeconstruction\UseDeconstructionTests.cs (2)
877LanguageVersion = LanguageVersion.CSharp9 912LanguageVersion = LanguageVersion.CSharp9
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (7)
33ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default, 55ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default, 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,
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForLocalFunctionsAnalyzerTests.cs (2)
912LanguageVersion = LanguageVersion.CSharp9, 941LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (43)
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\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
3367""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9), options: ImplicitTypeEverywhere()));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (3)
115new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))); 205""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 265""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (2)
28private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9); 119new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseNullCheckOverTypeCheckDiagnosticAnalyzerTests.cs (1)
31=> await VerifyAsync(source, fixedSource, LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
4181new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
src\Analyzers\CSharp\Tests\UseNullPropagation\UseNullPropagationTests.cs (2)
33LanguageVersion = LanguageVersion.CSharp9, 41private static async Task TestMissingInRegularAndScriptAsync(string testCode, LanguageVersion languageVersion = LanguageVersion.CSharp9)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (20)
176LanguageVersion = LanguageVersion.CSharp9, 218LanguageVersion = LanguageVersion.CSharp9, 242LanguageVersion = LanguageVersion.CSharp9, 300LanguageVersion = LanguageVersion.CSharp9, 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, 772LanguageVersion = LanguageVersion.CSharp9, 834LanguageVersion = LanguageVersion.CSharp9, 984LanguageVersion = LanguageVersion.CSharp9, 1037LanguageVersion = LanguageVersion.CSharp9, 1134LanguageVersion = LanguageVersion.CSharp9, 1155LanguageVersion = LanguageVersion.CSharp9, 1228LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
42[InlineData("x == null", "o is not string x", LanguageVersion.CSharp9)]
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests_FixAllTests.cs (1)
129""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (15)
49LanguageVersion = LanguageVersion.CSharp9, 80LanguageVersion = LanguageVersion.CSharp9, 111LanguageVersion = LanguageVersion.CSharp9, 142LanguageVersion = LanguageVersion.CSharp9, 173LanguageVersion = LanguageVersion.CSharp9, 204LanguageVersion = LanguageVersion.CSharp9, 247LanguageVersion = LanguageVersion.CSharp9, 284LanguageVersion = LanguageVersion.CSharp9, 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\UseSimpleUsingStatement\UseSimpleUsingStatementTests.cs (6)
1944LanguageVersion = LanguageVersion.CSharp9, 1979LanguageVersion = LanguageVersion.CSharp9, 2005LanguageVersion = LanguageVersion.CSharp9, 2044LanguageVersion = LanguageVersion.CSharp9, 2079LanguageVersion = LanguageVersion.CSharp9, 2116LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (3)
617""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 653""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 690""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UseTupleSwap\UseTupleSwapTests.cs (1)
444LanguageVersion = LanguageVersion.CSharp9,
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
1606[InlineData("9", LanguageVersion.CSharp9)] 1607[InlineData("9.0", LanguageVersion.CSharp9)] 1789InlineData(LanguageVersion.CSharp9, LanguageVersion.CSharp9), 1833InlineData("9", true, LanguageVersion.CSharp9), 1834InlineData("9.0", true, LanguageVersion.CSharp9),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (40)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
3008LanguageVersion = LanguageVersion.CSharp9,
CodeActions\InitializeParameter\AddParameterCheckTests.cs (4)
284LanguageVersion = LanguageVersion.CSharp9, 330LanguageVersion = LanguageVersion.CSharp9, 374LanguageVersion = LanguageVersion.CSharp9, 445LanguageVersion = LanguageVersion.CSharp9,
CodeActions\InlineMethod\CSharpInlineMethodTests.cs (2)
54LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, 79LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
Completion\CompletionProviders\AwaitCompletionProviderTests.cs (22)
86""", LanguageVersion.CSharp9); 99""", LanguageVersion.CSharp9); 105await VerifyKeywordAsync("$$", LanguageVersion.CSharp9); 118""", LanguageVersion.CSharp9); 131""", LanguageVersion.CSharp9); 137await VerifyKeywordAsync("var z = $$", LanguageVersion.CSharp9); 150""", LanguageVersion.CSharp9); 156await VerifyAbsenceAsync("using $$", LanguageVersion.CSharp9); 177""", LanguageVersion.CSharp9); 183await VerifyAbsenceAsync("foreach $$", LanguageVersion.CSharp9); 197""", LanguageVersion.CSharp9); 207""", LanguageVersion.CSharp9); 221""", LanguageVersion.CSharp9); 231""", LanguageVersion.CSharp9); 245""", LanguageVersion.CSharp9); 255""", LanguageVersion.CSharp9); 268""", LanguageVersion.CSharp9); 274await VerifyAbsenceAsync("lock (this) { $$ }", LanguageVersion.CSharp9); 288""", LanguageVersion.CSharp9); 298""", LanguageVersion.CSharp9); 311""", LanguageVersion.CSharp9); 317await VerifyKeywordAsync("lock($$", LanguageVersion.CSharp9);
ExtractInterface\ExtractInterfaceTests.cs (1)
541parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9),
Formatting\CSharpNewDocumentFormattingServiceTests.cs (1)
103parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
QuickInfo\SemanticQuickInfoSourceTests.cs (9)
8740Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8755Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8876Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8891Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8906Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8921Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 9312Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 9326Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 9341Options.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
25protected static readonly CSharpParseOptions CSharp9ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenAwaitForeachTests.cs (2)
8073[InlineData("in", LanguageVersion.CSharp9)] 8105[InlineData("in", LanguageVersion.CSharp9)]
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Emit\EditAndContinue\EditAndContinueClosureTests.cs (2)
817}", options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 834}", options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
Emit\EditAndContinue\LocalSlotMappingTests.cs (3)
5048var source0 = MarkedSource(sourceText, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 5049var source1 = MarkedSource(sourceText, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 5050var source2 = MarkedSource(sourceText, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
357yield return parseOptions.WithLanguageVersion(LanguageVersion.CSharp9);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (32)
Semantics\PatternMatchingTests3.cs (32)
2093var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2165var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2237var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2286var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2335var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2366var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.ReleaseExe); 2424var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.ReleaseExe); 2470var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2501var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2541var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2579var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2608var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2650var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), options: TestOptions.DebugExe); 2666var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2692var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2720var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2743var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2814var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2873var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2914var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2971var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 3000var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 3071var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 3140var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 3278var compilation = CreateCompilation(source + _iTupleSource, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 3366var compilation = CreateCompilation(source + _iTupleSource, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 4617var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 4783var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 4875var compilation = CreateCompilation(source, options: TestOptions.DebugDll, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 4969var compilation = CreateCompilation(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 5253var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 5322var compilation = CreateCompilation(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
Microsoft.CodeAnalysis.CSharp.Features (15)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
56if (root.SyntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp9)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.cs (1)
33(version >= LanguageVersion.CSharp9 ? Feature.RelationalPattern | Feature.OrPattern | Feature.AndPattern | Feature.TypePattern : 0);
ConvertProgram\ConvertToTopLevelStatementsCodeRefactoringProvider.cs (1)
36if (document.Project.ParseOptions!.LanguageVersion() < LanguageVersion.CSharp9 ||
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9 ||
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
36var analyzer = new Analyzer(supportsOrPatterns: semanticModel.SyntaxTree.Options.LanguageVersion() >= LanguageVersion.CSharp9);
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
32if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
44if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
36if (compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
60if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
42if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\UsePatternMatchingHelpers.cs (1)
78requiredLanguageVersion = (LanguageVersion)Math.Max((int)requiredLanguageVersion, (int)LanguageVersion.CSharp9);
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
101parent.SyntaxTree.Options.LanguageVersion() >= LanguageVersion.CSharp9)
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\UseIsNullCheckHelpers.cs (1)
26=> options.LanguageVersion() >= LanguageVersion.CSharp9;
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
172if (languageVersion >= LanguageVersion.CSharp9)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (374)
AddDebuggerDisplay\AddDebuggerDisplayTests.cs (1)
92LanguageVersion = LanguageVersion.CSharp9,
ConvertIfToSwitch\ConvertIfToSwitchTests.cs (19)
359LanguageVersion = LanguageVersion.CSharp9, 498[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 529LanguageVersion.CSharp9 => 1597LanguageVersion = LanguageVersion.CSharp9, 1689LanguageVersion = LanguageVersion.CSharp9, 1781LanguageVersion = LanguageVersion.CSharp9, 1873LanguageVersion = LanguageVersion.CSharp9, 2476LanguageVersion = LanguageVersion.CSharp9, 2540LanguageVersion = LanguageVersion.CSharp9, 2591LanguageVersion = LanguageVersion.CSharp9, 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 (2)
39LanguageVersion = LanguageVersion.CSharp9, 600LanguageVersion = LanguageVersion.CSharp9,
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (24)
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, 724LanguageVersion = LanguageVersion.CSharp9,
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (50)
47LanguageVersion = LanguageVersion.CSharp9, 92LanguageVersion = LanguageVersion.CSharp9, 117LanguageVersion = LanguageVersion.CSharp9, 145LanguageVersion = LanguageVersion.CSharp9, 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, 1409LanguageVersion = LanguageVersion.CSharp9, 1479LanguageVersion = LanguageVersion.CSharp9, 1553LanguageVersion = LanguageVersion.CSharp9,
ConvertToInterpolatedString\ConvertConcatenationToInterpolatedStringTests.cs (2)
1017LanguageVersion = LanguageVersion.CSharp9, 1073LanguageVersion = LanguageVersion.CSharp9,
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringTests.cs (2)
165""", new(new CSharpParseOptions(LanguageVersion.CSharp9))); 218""", new(new CSharpParseOptions(LanguageVersion.CSharp9)));
ConvertTupleToStruct\ConvertTupleToStructTests.cs (1)
46LanguageVersion languageVersion = LanguageVersion.CSharp9,
ExtractClass\ExtractClassTests.cs (5)
243LanguageVersion = LanguageVersion.CSharp9, 328LanguageVersion = LanguageVersion.CSharp9, 369LanguageVersion = LanguageVersion.CSharp9, 434LanguageVersion = LanguageVersion.CSharp9, 699LanguageVersion = LanguageVersion.CSharp9,
ExtractMethod\ExtractLocalFunctionTests.cs (7)
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));
ExtractMethod\ExtractMethodCodeRefactoringTests.cs (6)
5058LanguageVersion = LanguageVersion.CSharp9, 5096LanguageVersion = LanguageVersion.CSharp9, 5142LanguageVersion = LanguageVersion.CSharp9, 5192LanguageVersion = LanguageVersion.CSharp9, 5216""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))); 5245""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
InlineTemporary\InlineTemporaryTests.cs (7)
388[InlineData(LanguageVersion.CSharp9)] 416[InlineData(LanguageVersion.CSharp9, " 42")] // In C# 9, target-typed conditionals makes this work 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));
InvertIf\InvertIfTests.cs (2)
1270""", LanguageVersion.CSharp9); 1345""", LanguageVersion.CSharp9);
InvertLogical\InvertLogicalTests.cs (1)
21private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_AsTests.cs (1)
1468""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
ReplaceConditionalWithStatements\ReplaceConditionalWithStatementsTests.cs (2)
190LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, 219LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9,
SimplifyPropertyPattern\SimplifyPropertyPatternTests.cs (1)
45LanguageVersion = LanguageVersion.CSharp9,
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
7278[InlineData(LanguageVersion.CSharp9)]
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersTests.cs (1)
203LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (3)
2810""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2920""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 2962""", parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (2)
46LanguageVersion = LanguageVersion.CSharp9, 67LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToFileScopedNamespaceAnalyzerTests.cs (1)
32LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionTests.cs (5)
27private static readonly LanguageVersion CSharp9 = LanguageVersion.CSharp9; 2163LanguageVersion = LanguageVersion.CSharp9, 2207LanguageVersion = LanguageVersion.CSharp9, 2530LanguageVersion = LanguageVersion.CSharp9, 2587LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (7)
202LanguageVersion = LanguageVersion.CSharp9, 10419LanguageVersion = LanguageVersion.CSharp9, 10712LanguageVersion = LanguageVersion.CSharp9, 10776LanguageVersion = LanguageVersion.CSharp9, 10813LanguageVersion = LanguageVersion.CSharp9, 10850LanguageVersion = LanguageVersion.CSharp9, 12232LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticTests.cs (2)
26LanguageVersion = LanguageVersion.CSharp9 84LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveConfusingSuppression\RemoveConfusingSuppressionTests.cs (2)
172LanguageVersion = LanguageVersion.CSharp9, 211LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (26)
8229LanguageVersion = LanguageVersion.CSharp9, 8328LanguageVersion = LanguageVersion.CSharp9, 8376LanguageVersion = LanguageVersion.CSharp9, 8424LanguageVersion = LanguageVersion.CSharp9, 8523LanguageVersion = LanguageVersion.CSharp9, 8571LanguageVersion = LanguageVersion.CSharp9, 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,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (17)
54LanguageVersion = LanguageVersion.CSharp9, 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\RemoveUnreachableCode\RemoveUnreachableCodeTests.cs (7)
919LanguageVersion = LanguageVersion.CSharp9, 942LanguageVersion = LanguageVersion.CSharp9, 967LanguageVersion = LanguageVersion.CSharp9, 998LanguageVersion = LanguageVersion.CSharp9, 1026LanguageVersion = LanguageVersion.CSharp9, 1053LanguageVersion = LanguageVersion.CSharp9, 1078LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.cs (6)
446LanguageVersion = LanguageVersion.CSharp9, 474LanguageVersion = LanguageVersion.CSharp9, 493LanguageVersion = LanguageVersion.CSharp9, 520LanguageVersion = LanguageVersion.CSharp9, 1176LanguageVersion = LanguageVersion.CSharp9, 3124LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (25)
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9)); 2767[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 2843LanguageVersion = LanguageVersion.CSharp9, 3008[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3071LanguageVersion = LanguageVersion.CSharp9, 3120[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3208LanguageVersion = LanguageVersion.CSharp9, 3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9)); 3374LanguageVersion = LanguageVersion.CSharp9, 7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9)); 8470[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 8551LanguageVersion = LanguageVersion.CSharp9, 8938parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 8961parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 9124[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9217LanguageVersion = LanguageVersion.CSharp9, 9228[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9256[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9339LanguageVersion = LanguageVersion.CSharp9, 9712LanguageVersion = LanguageVersion.CSharp9, 9750LanguageVersion = LanguageVersion.CSharp9, 9791LanguageVersion = LanguageVersion.CSharp9, 9832LanguageVersion = LanguageVersion.CSharp9, 9873LanguageVersion = LanguageVersion.CSharp9, 9914LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (8)
485LanguageVersion.CSharp9, 702LanguageVersion.CSharp9, 1064expected: LanguageVersion.CSharp9, 1091new CSharpParseOptions(LanguageVersion.CSharp9)); 1169LanguageVersion.CSharp9, 1180new CSharpParseOptions(LanguageVersion.CSharp9)); 1199new CSharpParseOptions(LanguageVersion.CSharp9)); 1214expected: LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForIfNullStatementCheckTests.cs (3)
181LanguageVersion = LanguageVersion.CSharp9, 251LanguageVersion = LanguageVersion.CSharp9, 448LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (1)
959LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (5)
1019""", LanguageVersion.CSharp9, options: 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 (5)
23private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9); 978[InlineData(LanguageVersion.CSharp9, "null")] 1044[InlineData(LanguageVersion.CSharp9, "null")] 1079[InlineData(LanguageVersion.CSharp9, "null")] 1114[InlineData(LanguageVersion.CSharp9, "null")]
src\Analyzers\CSharp\Tests\UseDeconstruction\UseDeconstructionTests.cs (2)
877LanguageVersion = LanguageVersion.CSharp9 912LanguageVersion = LanguageVersion.CSharp9
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (7)
33ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default, 55ReferenceAssemblies = version == LanguageVersion.CSharp9 ? ReferenceAssemblies.Net.Net50 : ReferenceAssemblies.Default, 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,
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForLocalFunctionsAnalyzerTests.cs (2)
912LanguageVersion = LanguageVersion.CSharp9, 941LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (43)
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\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
3367""", new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9), options: ImplicitTypeEverywhere()));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (3)
115new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))); 205""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)); 265""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (2)
28private static readonly ParseOptions CSharp9 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9); 119new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseNullCheckOverTypeCheckDiagnosticAnalyzerTests.cs (1)
31=> await VerifyAsync(source, fixedSource, LanguageVersion.CSharp9);
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
4181new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9)));
src\Analyzers\CSharp\Tests\UseNullPropagation\UseNullPropagationTests.cs (2)
33LanguageVersion = LanguageVersion.CSharp9, 41private static async Task TestMissingInRegularAndScriptAsync(string testCode, LanguageVersion languageVersion = LanguageVersion.CSharp9)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (20)
176LanguageVersion = LanguageVersion.CSharp9, 218LanguageVersion = LanguageVersion.CSharp9, 242LanguageVersion = LanguageVersion.CSharp9, 300LanguageVersion = LanguageVersion.CSharp9, 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, 772LanguageVersion = LanguageVersion.CSharp9, 834LanguageVersion = LanguageVersion.CSharp9, 984LanguageVersion = LanguageVersion.CSharp9, 1037LanguageVersion = LanguageVersion.CSharp9, 1134LanguageVersion = LanguageVersion.CSharp9, 1155LanguageVersion = LanguageVersion.CSharp9, 1228LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
42[InlineData("x == null", "o is not string x", LanguageVersion.CSharp9)]
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests_FixAllTests.cs (1)
129""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (15)
49LanguageVersion = LanguageVersion.CSharp9, 80LanguageVersion = LanguageVersion.CSharp9, 111LanguageVersion = LanguageVersion.CSharp9, 142LanguageVersion = LanguageVersion.CSharp9, 173LanguageVersion = LanguageVersion.CSharp9, 204LanguageVersion = LanguageVersion.CSharp9, 247LanguageVersion = LanguageVersion.CSharp9, 284LanguageVersion = LanguageVersion.CSharp9, 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\UseSimpleUsingStatement\UseSimpleUsingStatementTests.cs (6)
1944LanguageVersion = LanguageVersion.CSharp9, 1979LanguageVersion = LanguageVersion.CSharp9, 2005LanguageVersion = LanguageVersion.CSharp9, 2044LanguageVersion = LanguageVersion.CSharp9, 2079LanguageVersion = LanguageVersion.CSharp9, 2116LanguageVersion = LanguageVersion.CSharp9,
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (3)
617""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 653""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9)); 690""", TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9));
src\Analyzers\CSharp\Tests\UseTupleSwap\UseTupleSwapTests.cs (1)
444LanguageVersion = LanguageVersion.CSharp9,
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (1)
26private static readonly ParseOptions CSharp9 = TestOptions.RegularPreview.WithLanguageVersion(LanguageVersion.CSharp9);
UseRecursivePatterns\UseRecursivePatternsRefactoringTests.cs (2)
25LanguageVersion languageVersion = LanguageVersion.CSharp9) 98public async Task TestLogicalAndExpression_Receiver(string actual, string expected, LanguageVersion languageVersion = LanguageVersion.CSharp9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NullableReferenceTypesTests.cs (1)
155367[CombinatorialValues(LanguageVersion.CSharp9, LanguageVersion.CSharp11)] LanguageVersion languageVersionA,
SourceGeneration\GeneratorDriverTests.cs (1)
4492var newParseOptions = parseOptions.WithLanguageVersion(LanguageVersion.CSharp9);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
SymbolDisplay\SymbolDisplayTests.cs (2)
8215TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9), 8236TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp9),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (37)
LexicalAndXml\PreprocessorTests.cs (1)
3224[InlineData(LanguageVersion.CSharp9, "9.0")]
Parsing\LambdaParameterParsingTests.cs (3)
5147[InlineData(LanguageVersion.CSharp9)] 5177[InlineData(LanguageVersion.CSharp9)] 5205[InlineData(LanguageVersion.CSharp9)]
Parsing\MemberDeclarationParsingTests.cs (32)
2349foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 2491foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 2615foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 2721foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 2827foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 3230foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 3375foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 3503foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 3613foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 3723foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 4269foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 4403foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 4520foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 4619foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 4718foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 5109foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 5247foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 5368foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 5471foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 5574foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6161foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6231foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6294foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6394foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6461foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6545foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 6645foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 7019foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 7132foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 7236foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 7340foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview }) 7444foreach (var version in new[] { LanguageVersion.CSharp9, LanguageVersion.Preview })
Parsing\TopLevelStatementsParsingTests.cs (1)
1613[InlineData(LanguageVersion.CSharp9)]
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
41public static readonly CSharpParseOptions Regular9 = Regular.WithLanguageVersion(LanguageVersion.CSharp9);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
58=> options.LanguageVersion() >= LanguageVersion.CSharp9; 64=> options.LanguageVersion() >= LanguageVersion.CSharp9; 1488=> options.LanguageVersion() >= LanguageVersion.CSharp9;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1547if (originalSemanticModel.Compilation.LanguageVersion() < LanguageVersion.CSharp9 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
839=> originalExpression.GetLanguageVersion() >= LanguageVersion.CSharp9;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (9)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (8)
591showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 625showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 668showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 696showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 724showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 758showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp9) 2438}]]></Document>, languageVersion:=LanguageVersion.CSharp9, showCompletionInArgumentLists:=showCompletionInArgumentLists) 2461}]]></Document>, languageVersion:=LanguageVersion.CSharp9, showCompletionInArgumentLists:=showCompletionInArgumentLists)
Simplification\CastSimplificationTests.vb (1)
515Await TestAsync(input, expected, csharpParseOptions:=CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\NativeIntegerTests.vb (1)
21Dim comp As Compilation = CreateCSharpCompilation(source0, parseOptions:=New CSharp.CSharpParseOptions(CSharp.LanguageVersion.CSharp9))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (1)
46[InlineData(LanguageVersion.CSharp9)]
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (1)
171[InlineData(LanguageVersion.CSharp9)]
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
21private const LanguageVersion MinimumSupportedLanguageVersion = LanguageVersion.CSharp9;