36 references to LanguageVersion
Microsoft.CodeAnalysis.CSharp.CodeStyle (36)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9 ||
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
35if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
32if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
32if (MakeLocalFunctionStaticHelper.IsStaticLocalFunctionSupported(context.Compilation.LanguageVersion()))
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
38if (compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
34if (compilation.LanguageVersion() < LanguageVersion.CSharp7_2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
48if (context.Compilation.LanguageVersion().IsCSharp11OrAbove())
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
45if (compilationContext.Compilation.LanguageVersion() < LanguageVersion.CSharp10)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
43=> compilation.LanguageVersion() >= LanguageVersion.CSharp6; 46=> compilation.LanguageVersion() >= LanguageVersion.CSharp6; 49=> compilation.LanguageVersion() >= LanguageVersion.Preview;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (1)
56if (!compilation.LanguageVersion().SupportsCollectionExpressions())
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerDiagnosticAnalyzer.cs (2)
44=> compilation.LanguageVersion() >= LanguageVersion.CSharp3; 47=> compilation.LanguageVersion().SupportsCollectionExpressions();
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs (2)
22=> compilation.LanguageVersion() >= LanguageVersion.CSharp7; 25=> compilation.LanguageVersion() >= LanguageVersion.CSharp8;
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
36if (compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
61if (compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
47if (context.Compilation.LanguageVersion() >= LanguageVersion.CSharp11)
src\Analyzers\CSharp\Analyzers\UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
35=> compilation.LanguageVersion() >= LanguageVersion.CSharp6;
src\Analyzers\CSharp\Analyzers\UseObjectInitializer\CSharpUseObjectInitializerDiagnosticAnalyzer.cs (1)
36return compilation.LanguageVersion() >= LanguageVersion.CSharp3;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (2)
46if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8) 72if (context.Compilation.LanguageVersion() < requiredLanguageVersion)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
52if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
43if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
73if (!context.Compilation.LanguageVersion().SupportsPrimaryConstructors())
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
70if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
61if (!compilation.LanguageVersion().IsCSharp13OrAbove())
src\Analyzers\CSharp\Analyzers\UseThrowExpression\CSharpUseThrowExpressionDiagnosticAnalyzer.cs (1)
25=> compilation.LanguageVersion() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
53if (compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
48if (!compilation.LanguageVersion().IsCSharp14OrAbove())
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
49if (!context.Compilation.LanguageVersion().IsCSharp11OrAbove())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1527if (originalSemanticModel.Compilation.LanguageVersion() < LanguageVersion.CSharp9 &&