376 references to CSharp8
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
221parseOptions = parseOptions.WithLanguageVersion(LanguageVersion.CSharp8);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CSharpCompilerTest.cs (1)
125Assert.Equal(LanguageVersion.CSharp8, parseOptions.LanguageVersion);
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (4)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (2)
60/// <see cref="LanguageVersion.CSharp8"/>. 62public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.CSharp8;
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeRefactoringVerifier`1+Test.cs (2)
58/// <see cref="LanguageVersion.CSharp8"/>. 60public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.CSharp8;
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
594return LanguageVersion.CSharp8;
LanguageVersion.cs (4)
288case LanguageVersion.CSharp8: 325case LanguageVersion.CSharp8: 398case LanguageVersion.CSharp8: 503result = LanguageVersion.CSharp8;
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
35if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (1)
15=> languageVersion >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
38if (compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
37if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
27options.LanguageVersion() >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
64if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
62if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs (1)
25=> compilation.LanguageVersion() >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\UsePatternMatchingHelpers.cs (1)
24requiredLanguageVersion = LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
69if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
89if (languageVersion >= LanguageVersion.CSharp8)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (2)
46if (semanticModel.Compilation.LanguageVersion().MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 68var isLanguageVersionGreaterOrEqualToCSharp8 = (semanticModel.Compilation as CSharpCompilation)?.LanguageVersion >= LanguageVersion.CSharp8;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (117)
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (1)
4017LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticTests.cs (1)
56LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
31private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementTests.cs (4)
279LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 361LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 821LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 868LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\NewLines\MultipleBlankLines\MultipleBlankLinesTests.cs (10)
545LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 564LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 590LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 617LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 644LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 785LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 809LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 848LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 891LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 938LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
24private static readonly TestParameters s_nullableFeature = new TestParameters(parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\RemoveConfusingSuppression\RemoveConfusingSuppressionTests.cs (2)
104LanguageVersion = LanguageVersion.CSharp8 138LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (6)
8315LanguageVersion = LanguageVersion.CSharp8 8364LanguageVersion = LanguageVersion.CSharp8 8413LanguageVersion = LanguageVersion.CSharp8, 8513LanguageVersion = LanguageVersion.CSharp8 8562LanguageVersion = LanguageVersion.CSharp8 8611LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (1)
76LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1387""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (23)
2736""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 2775[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3010""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 3016[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3122""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 3128[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3259""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 5474""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8237""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8253""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8277""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8301""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8321""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8472""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8478[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 8924""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 9126""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 9132[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9164""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 9190""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 9236[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9264[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9308""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (19)
77LanguageVersion.CSharp8, 91LanguageVersion.CSharp8, 351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|] 371expected: LanguageVersion.CSharp8, 428LanguageVersion.CSharp8, 459LanguageVersion.CSharp8, 703new CSharpParseOptions(LanguageVersion.CSharp8)); 848expected: LanguageVersion.CSharp8, 890LanguageVersion.CSharp8, 904LanguageVersion.CSharp8, 918LanguageVersion.CSharp8, 931LanguageVersion.CSharp8, 964LanguageVersion.CSharp8, 993LanguageVersion.CSharp8, 1027LanguageVersion.CSharp8, 1065new CSharpParseOptions(LanguageVersion.CSharp8)); 1170new CSharpParseOptions(LanguageVersion.CSharp8)); 1215new CSharpParseOptions(LanguageVersion.CSharp8)); 1233new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (2)
266LanguageVersion = LanguageVersion.CSharp8 309LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundCoalesceAssignmentTests.cs (1)
31private static async Task TestMissingAsync(string testCode, LanguageVersion languageVersion = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (4)
26LanguageVersion languageVersion = LanguageVersion.CSharp8, 43LanguageVersion languageVersion = LanguageVersion.CSharp8, 988""", LanguageVersion.CSharp8, PreferImplicitTypeAlways); 1180""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (5)
21private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 981[InlineData(LanguageVersion.CSharp8, "(string)null")] 1047[InlineData(LanguageVersion.CSharp8, "(string)null")] 1082[InlineData(LanguageVersion.CSharp8, "(string)null")] 1117[InlineData(LanguageVersion.CSharp8, "(string)null")]
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (3)
28LanguageVersion version = LanguageVersion.CSharp8) 47private static async Task TestWithUseExpressionBodyIncludingPropertiesAndIndexers(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8) 64private static async Task TestWithUseBlockBodyIncludingPropertiesAndIndexers(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs (1)
24private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForPropertiesAnalyzerTests.cs (1)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (1)
35LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseIndexOperatorTests.cs (2)
542LanguageVersion = LanguageVersion.CSharp8, 579LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseRangeOperatorTests.cs (2)
102LanguageVersion = LanguageVersion.CSharp8, 139LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
144""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (3)
95new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 175""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)); 235""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (2)
27private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 99new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseNullCheckOverTypeCheckDiagnosticAnalyzerTests.cs (1)
34=> await VerifyAsync(source, fixedSource, LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (5)
160LanguageVersion = LanguageVersion.CSharp8, 204LanguageVersion = LanguageVersion.CSharp8, 275LanguageVersion = LanguageVersion.CSharp8, 371LanguageVersion = LanguageVersion.CSharp8, 395LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (10)
47public async Task InlineTypeCheck1(string input, string output, LanguageVersion version = LanguageVersion.CSharp8) 63private async Task TestStatement(string input, string output, LanguageVersion version = LanguageVersion.CSharp8) 1170""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1209""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1475""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1506""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1561""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1593""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1656""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1698""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests_FixAllTests.cs (1)
72""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (1)
304LanguageVersion = LanguageVersion.CSharp8,
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
1603[InlineData("8", LanguageVersion.CSharp8)] 1604[InlineData("8.0", LanguageVersion.CSharp8)] 1787InlineData(LanguageVersion.CSharp8, LanguageVersion.CSharp8), 1830InlineData("8", true, LanguageVersion.CSharp8), 1831InlineData("8.0", true, LanguageVersion.CSharp8),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
Classification\SyntacticClassifierTests.cs (1)
2860[new CSharpParseOptions(LanguageVersion.CSharp8)],
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (5)
2776LanguageVersion = LanguageVersion.CSharp8, 2825LanguageVersion = LanguageVersion.CSharp8, 2962LanguageVersion = LanguageVersion.CSharp8, 3055LanguageVersion = LanguageVersion.CSharp8, 3105LanguageVersion = LanguageVersion.CSharp8,
CodeActions\InitializeParameter\AddParameterCheckTests.cs (2)
246[InlineData(LanguageVersion.CSharp8)] 294[InlineData(LanguageVersion.CSharp8)]
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (9)
611[InlineData(LanguageVersion.CSharp8)] 630if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 641[InlineData(LanguageVersion.CSharp8)] 661if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 672[InlineData(LanguageVersion.CSharp8)] 692if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 2597[InlineData(LanguageVersion.CSharp8)] 2616if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 2628[InlineData(LanguageVersion.CSharp8)]
QuickInfo\SemanticQuickInfoSourceTests.cs (2)
2849Options.Regular.WithLanguageVersion(LanguageVersion.CSharp8), 2885Options.Regular.WithLanguageVersion(LanguageVersion.CSharp8),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
353languageVersion: LanguageVersion.CSharp8,
Microsoft.CodeAnalysis.CSharp.Features (20)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
64ParseOptions: CSharpParseOptions { LanguageVersion: >= LanguageVersion.CSharp8 },
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.cs (1)
36(version >= LanguageVersion.CSharp8 ? Feature.SwitchExpression : 0) |
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
171=> node.SyntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp8; 218if (LocalFunction && (!Options.PreferStaticLocalFunction.Value || languageVersion < LanguageVersion.CSharp8))
IntroduceUsingStatement\CSharpIntroduceUsingStatementCodeRefactoringProvider.cs (1)
75options.LanguageVersion() < LanguageVersion.CSharp8)
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
107if (options.LanguageVersion < LanguageVersion.CSharp8)
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
89if (parseOptions.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
35if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (1)
15=> languageVersion >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
38if (compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
37if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
27options.LanguageVersion() >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
64if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
62if (compilation.LanguageVersion < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs (1)
25=> compilation.LanguageVersion() >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\UsePatternMatchingHelpers.cs (1)
24requiredLanguageVersion = LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
69if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
89if (languageVersion >= LanguageVersion.CSharp8)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (150)
ConvertAnonymousType\ConvertAnonymousTypeToClassTests.cs (1)
20private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
ConvertForToForEach\ConvertForToForEachTests.cs (1)
1768""", parameters: new TestParameters(new CSharpParseOptions(LanguageVersion.CSharp8)));
ConvertIfToSwitch\ConvertIfToSwitchTests.cs (12)
315LanguageVersion = LanguageVersion.CSharp8, 498[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 513LanguageVersion.CSharp8 => 627LanguageVersion = LanguageVersion.CSharp8, 668LanguageVersion = LanguageVersion.CSharp8, 1547LanguageVersion = LanguageVersion.CSharp8, 1639LanguageVersion = LanguageVersion.CSharp8, 1731LanguageVersion = LanguageVersion.CSharp8, 1823LanguageVersion = LanguageVersion.CSharp8, 2432LanguageVersion = LanguageVersion.CSharp8, 2502LanguageVersion = LanguageVersion.CSharp8, 2620LanguageVersion = LanguageVersion.CSharp8,
ConvertLinq\ConvertLinqQueryToForEachTests.cs (1)
4474await TestInRegularAndScriptAsync(source, output, parseOptions: new CSharpParseOptions(CodeAnalysis.CSharp.LanguageVersion.CSharp8));
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (1)
71LanguageVersion = LanguageVersion.CSharp8,
ConvertProgram\ConvertToTopLevelStatementsRefactoringTests.cs (1)
169LanguageVersion = LanguageVersion.CSharp8,
ExtractMethod\ExtractLocalFunctionTests.cs (1)
3634""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp8)));
InlineTemporary\InlineTemporaryTests.cs (3)
387[InlineData(LanguageVersion.CSharp8)] 415[InlineData(LanguageVersion.CSharp8, " (int?)42")] 5094await TestMissingInRegularAndScriptAsync(code, new TestParameters(parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp8)));
IntroduceUsingStatement\IntroduceUsingStatementTests.cs (6)
485""", LanguageVersion.CSharp8); 1266""", LanguageVersion.CSharp8); 1296""", LanguageVersion.CSharp8); 1328""", LanguageVersion.CSharp8); 1372""", LanguageVersion.CSharp8); 1418""", LanguageVersion.CSharp8);
InvertIf\InvertIfTests.cs (2)
1234""", LanguageVersion.CSharp8); 1309""", LanguageVersion.CSharp8);
InvertLogical\InvertLogicalTests.cs (1)
20private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
MakeLocalFunctionStatic\MakeLocalFunctionStaticRefactoringTests.cs (1)
23private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProviderTests.cs (1)
30private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_AsTests.cs (1)
1453""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (1)
4017LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticTests.cs (1)
56LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
31private static readonly ParseOptions CSharp8ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementTests.cs (4)
279LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 361LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 821LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 868LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\NewLines\MultipleBlankLines\MultipleBlankLinesTests.cs (10)
545LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 564LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 590LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 617LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 644LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 785LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 809LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 848LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 891LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, 938LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
24private static readonly TestParameters s_nullableFeature = new TestParameters(parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\RemoveConfusingSuppression\RemoveConfusingSuppressionTests.cs (2)
104LanguageVersion = LanguageVersion.CSharp8 138LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.cs (6)
8315LanguageVersion = LanguageVersion.CSharp8 8364LanguageVersion = LanguageVersion.CSharp8 8413LanguageVersion = LanguageVersion.CSharp8, 8513LanguageVersion = LanguageVersion.CSharp8 8562LanguageVersion = LanguageVersion.CSharp8 8611LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\RemoveUnnecessaryDiscardDesignation\RemoveUnnecessaryDiscardDesignationTests.cs (1)
76LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1387""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (23)
2736""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 2775[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3010""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 3016[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3122""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 3128[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 3259""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 5474""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8237""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8253""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8277""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8301""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8321""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8472""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 8478[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 8924""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 9126""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 9132[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9164""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 9190""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)); 9236[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9264[CombinatorialValues(LanguageVersion.CSharp8, LanguageVersion.CSharp9)] LanguageVersion languageVersion) 9308""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (19)
77LanguageVersion.CSharp8, 91LanguageVersion.CSharp8, 351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|] 371expected: LanguageVersion.CSharp8, 428LanguageVersion.CSharp8, 459LanguageVersion.CSharp8, 703new CSharpParseOptions(LanguageVersion.CSharp8)); 848expected: LanguageVersion.CSharp8, 890LanguageVersion.CSharp8, 904LanguageVersion.CSharp8, 918LanguageVersion.CSharp8, 931LanguageVersion.CSharp8, 964LanguageVersion.CSharp8, 993LanguageVersion.CSharp8, 1027LanguageVersion.CSharp8, 1065new CSharpParseOptions(LanguageVersion.CSharp8)); 1170new CSharpParseOptions(LanguageVersion.CSharp8)); 1215new CSharpParseOptions(LanguageVersion.CSharp8)); 1233new CSharpParseOptions(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (2)
266LanguageVersion = LanguageVersion.CSharp8 309LanguageVersion = LanguageVersion.CSharp8
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundCoalesceAssignmentTests.cs (1)
31private static async Task TestMissingAsync(string testCode, LanguageVersion languageVersion = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (4)
26LanguageVersion languageVersion = LanguageVersion.CSharp8, 43LanguageVersion languageVersion = LanguageVersion.CSharp8, 988""", LanguageVersion.CSharp8, PreferImplicitTypeAlways); 1180""", LanguageVersion.CSharp8, PreferImplicitTypeAlways);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (5)
21private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 981[InlineData(LanguageVersion.CSharp8, "(string)null")] 1047[InlineData(LanguageVersion.CSharp8, "(string)null")] 1082[InlineData(LanguageVersion.CSharp8, "(string)null")] 1117[InlineData(LanguageVersion.CSharp8, "(string)null")]
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (3)
28LanguageVersion version = LanguageVersion.CSharp8) 47private static async Task TestWithUseExpressionBodyIncludingPropertiesAndIndexers(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8) 64private static async Task TestWithUseBlockBodyIncludingPropertiesAndIndexers(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs (1)
24private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForPropertiesAnalyzerTests.cs (1)
25private static async Task TestWithUseExpressionBody(string code, string fixedCode, LanguageVersion version = LanguageVersion.CSharp8)
src\Analyzers\CSharp\Tests\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationTests.cs (1)
35LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseIndexOperatorTests.cs (2)
542LanguageVersion = LanguageVersion.CSharp8, 579LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseRangeOperatorTests.cs (2)
102LanguageVersion = LanguageVersion.CSharp8, 139LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
144""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (3)
95new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 175""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)); 235""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (2)
27private static readonly ParseOptions CSharp8 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 99new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseNullCheckOverTypeCheckDiagnosticAnalyzerTests.cs (1)
34=> await VerifyAsync(source, fixedSource, LanguageVersion.CSharp8);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (5)
160LanguageVersion = LanguageVersion.CSharp8, 204LanguageVersion = LanguageVersion.CSharp8, 275LanguageVersion = LanguageVersion.CSharp8, 371LanguageVersion = LanguageVersion.CSharp8, 395LanguageVersion = LanguageVersion.CSharp8,
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (10)
47public async Task InlineTypeCheck1(string input, string output, LanguageVersion version = LanguageVersion.CSharp8) 63private async Task TestStatement(string input, string output, LanguageVersion version = LanguageVersion.CSharp8) 1170""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1209""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1475""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1506""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1561""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1593""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1656""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1698""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests_FixAllTests.cs (1)
72""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpUseNotPatternTests.cs (1)
304LanguageVersion = LanguageVersion.CSharp8,
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (7)
ScriptOptionsTests.cs (5)
22var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 23Assert.Equal(LanguageVersion.CSharp8, ((CSharpParseOptions)options.ParseOptions).LanguageVersion); 29var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 30Assert.Same(options, options.WithLanguageVersion(LanguageVersion.CSharp8)); 37Assert.Throws<InvalidOperationException>(() => options.WithLanguageVersion(LanguageVersion.CSharp8));
ScriptTests.cs (2)
969string x = null;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8)); 991var script = CSharpScript.Create(code, ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\NullableReferenceTypesTests.cs (2)
81306parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp8)); 81377var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] { source }, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp8));
Semantics\TargetTypedConditionalOperatorTests.cs (4)
180foreach (var langVersion in new[] { LanguageVersion.CSharp8, MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion() }) 205foreach (var langVersion in new[] { LanguageVersion.CSharp8, MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion() }) 227foreach (var langVersion in new[] { LanguageVersion.CSharp8, MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion() }) 263foreach (var langVersion in new[] { LanguageVersion.CSharp8, MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion() })
SourceGeneration\GeneratorDriverTests.cs (1)
3596parseOptions = parseOptions.WithLanguageVersion(LanguageVersion.CSharp8);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Parsing\AsyncStreamsParsingTests.cs (2)
22return SyntaxFactory.ParseSyntaxTree(text, options: (options ?? TestOptions.Regular).WithLanguageVersion(LanguageVersion.CSharp8)); 27return SyntaxFactory.ParseExpression(text, options: (options ?? TestOptions.Regular).WithLanguageVersion(LanguageVersion.CSharp8));
Parsing\DeclarationScopeParsingTests.cs (3)
3249[InlineData(LanguageVersion.CSharp8)] 3260if (langVersion == LanguageVersion.CSharp8) 14215[InlineData(LanguageVersion.CSharp8)]
Parsing\ExpressionParsingTests.cs (2)
241}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)).VerifyDiagnostics(); 316}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)).VerifyDiagnostics();
Parsing\PatternParsingTests.cs (2)
22UsingStatement(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8), expectedErrors); 6578foreach (var langVersion in new[] { LanguageVersion.CSharp6, LanguageVersion.CSharp7, LanguageVersion.CSharp8 })
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
TestOptions.cs (2)
40public static readonly CSharpParseOptions Regular8 = Regular.WithLanguageVersion(LanguageVersion.CSharp8); 51public static readonly CSharpParseOptions WithoutCovariantReturns = Regular.WithLanguageVersion(LanguageVersion.CSharp8);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (2)
46if (semanticModel.Compilation.LanguageVersion().MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8) 68var isLanguageVersionGreaterOrEqualToCSharp8 = (semanticModel.Compilation as CSharpCompilation)?.LanguageVersion >= LanguageVersion.CSharp8;
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
594if (results.Count > 0 && _compilation is CSharpCompilation { LanguageVersion : LanguageVersion version and < LanguageVersion.CSharp8 }) 597Diag(DiagnosticDescriptors.LoggingUnsupportedLanguageVersion, null, version.ToDisplayString(), LanguageVersion.CSharp8.ToDisplayString());
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
151if (results.Count > 0 && _compilation is CSharpCompilation { LanguageVersion : LanguageVersion version and < LanguageVersion.CSharp8 }) 154Diag(DiagDescriptors.OptionsUnsupportedLanguageVersion, null, version.ToDisplayString(), LanguageVersion.CSharp8.ToDisplayString());
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (6)
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (3)
44[InlineData(LanguageVersion.CSharp8)] 52const LanguageVersion attemptedVersion = LanguageVersion.CSharp8; 79const LanguageVersion attemptedVersion = LanguageVersion.CSharp8;
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (3)
170[InlineData(LanguageVersion.CSharp8)] 193const LanguageVersion attemptedVersion = LanguageVersion.CSharp8; 224const LanguageVersion attemptedVersion = LanguageVersion.CSharp8;