36 references to LanguageVersion
Microsoft.CodeAnalysis.CSharp.CodeStyle (36)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
38
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp9 ||
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
35
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
32
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
32
if (MakeLocalFunctionStaticHelper.IsStaticLocalFunctionSupported(context.Compilation.
LanguageVersion
()))
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
38
if (compilation.
LanguageVersion
() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
34
if (compilation.
LanguageVersion
() < LanguageVersion.CSharp7_2)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
38
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
48
if (context.Compilation.
LanguageVersion
().IsCSharp11OrAbove())
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
45
if (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)
56
if (!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)
46
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
38
if (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)
36
if (compilation.
LanguageVersion
() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
61
if (compilation.
LanguageVersion
() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
47
if (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)
36
return compilation.
LanguageVersion
() >= LanguageVersion.CSharp3;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (2)
46
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp8)
72
if (context.Compilation.
LanguageVersion
() < requiredLanguageVersion)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
52
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
43
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp9)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
73
if (!context.Compilation.
LanguageVersion
().SupportsPrimaryConstructors())
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
70
if (context.Compilation.
LanguageVersion
() < LanguageVersion.CSharp8)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
61
if (!compilation.
LanguageVersion
().IsCSharp13OrAbove())
src\Analyzers\CSharp\Analyzers\UseThrowExpression\CSharpUseThrowExpressionDiagnosticAnalyzer.cs (1)
25
=> compilation.
LanguageVersion
() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
53
if (compilation.
LanguageVersion
() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
48
if (!compilation.
LanguageVersion
().IsCSharp14OrAbove())
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
49
if (!context.Compilation.
LanguageVersion
().IsCSharp11OrAbove())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1527
if (originalSemanticModel.Compilation.
LanguageVersion
() < LanguageVersion.CSharp9 &&