157 references to CSharp7
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
642return LanguageVersion.CSharp7;
LanguageVersion.cs (4)
284case LanguageVersion.CSharp7: 317case LanguageVersion.CSharp7: 390case LanguageVersion.CSharp7: 486result = LanguageVersion.CSharp7;
Microsoft.CodeAnalysis.CSharp.CodeStyle (16)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
72if (csOptions.LanguageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
30=> tree.Options.LanguageVersion() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
192if (languageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
57languageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs (1)
22=> compilation.LanguageVersion() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
61if (compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
64if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
52if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
125languageVersion >= LanguageVersion.CSharp7 || 204if (languageVersion >= LanguageVersion.CSharp7 && throwStatement.Expression != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
51=> options.LanguageVersion() >= LanguageVersion.CSharp7; 54=> options.LanguageVersion() >= LanguageVersion.CSharp7; 69=> options.LanguageVersion() >= LanguageVersion.CSharp7;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
167=> ((CSharpParseOptions)options).LanguageVersion >= LanguageVersion.CSharp7;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (24)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
1835""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7));
src\Analyzers\CSharp\Tests\MakeStructMemberReadOnly\MakeStructMemberReadOnlyTests.cs (1)
473LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
36LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (11)
92new CSharpParseOptions(LanguageVersion.CSharp7)); 108LanguageVersion.CSharp7, 157new CSharpParseOptions(LanguageVersion.CSharp7)); 191new CSharpParseOptions(LanguageVersion.CSharp7)); 219new CSharpParseOptions(LanguageVersion.CSharp7)); 255new CSharpParseOptions(LanguageVersion.CSharp7)); 401LanguageVersion.CSharp7, 716new CSharpParseOptions(LanguageVersion.CSharp7)); 749new CSharpParseOptions(LanguageVersion.CSharp7)); 778new CSharpParseOptions(LanguageVersion.CSharp7)); 812new CSharpParseOptions(LanguageVersion.CSharp7));
src\Analyzers\CSharp\Tests\UseDefaultLiteral\UseDefaultLiteralTests.cs (1)
38LanguageVersion = LanguageVersion.CSharp7
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseIndexOperatorTests.cs (1)
42LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseRangeOperatorTests.cs (2)
42LanguageVersion = LanguageVersion.CSharp7, 403LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
103""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
26private static readonly ParseOptions CSharp7 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (4)
71LanguageVersion = LanguageVersion.CSharp7, 93LanguageVersion = LanguageVersion.CSharp7, 113LanguageVersion = LanguageVersion.CSharp7, 138LanguageVersion = LanguageVersion.CSharp7,
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (7)
1598[InlineData("7", LanguageVersion.CSharp7)] 1599[InlineData("7.0", LanguageVersion.CSharp7)] 1622[InlineData("6", "7", LanguageVersion.CSharp7)] 1783InlineData(LanguageVersion.CSharp7, LanguageVersion.CSharp7), 1824InlineData("7", true, LanguageVersion.CSharp7), 1825InlineData("7.0", true, LanguageVersion.CSharp7),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
ChangeSignature\ChangeSignature_CheckAllSignatureChanges.cs (1)
182parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7));
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (2)
148LanguageVersion = LanguageVersion.CSharp7, 2916LanguageVersion = LanguageVersion.CSharp7,
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (5)
610[InlineData(LanguageVersion.CSharp7)] 640[InlineData(LanguageVersion.CSharp7)] 671[InlineData(LanguageVersion.CSharp7)] 2596[InlineData(LanguageVersion.CSharp7)] 2627[InlineData(LanguageVersion.CSharp7)]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (25)
CodeGen\CodeGenAsyncMainTests.cs (15)
65var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 93var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.WithMainTypeName("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 159var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 233var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 667var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 690var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 809var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 858var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 923var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 945var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 1007var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 1029var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 1142var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)).VerifyDiagnostics(); 1273var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseDebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)).VerifyDiagnostics( 1310var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseDebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)).VerifyDiagnostics(
CodeGen\CodeGenDeconstructTests.cs (8)
1636parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8777parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8802parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8828parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8863parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8889parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8932parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 8987parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7));
CodeGen\CodeGenTupleTest.cs (2)
4077var comp7 = CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 4105var comp = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7),
Microsoft.CodeAnalysis.CSharp.Features (13)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.cs (1)
35(version >= LanguageVersion.CSharp7 ? Feature.SourcePattern | Feature.IsTypePattern | Feature.CaseGuard : 0) |
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
72if (csOptions.LanguageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
30=> tree.Options.LanguageVersion() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
192if (languageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
57languageVersion < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
38if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer.cs (1)
22=> compilation.LanguageVersion() >= LanguageVersion.CSharp7;
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
61if (compilation.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
64if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp7)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
52if (context.Compilation.LanguageVersion() < LanguageVersion.CSharp7)
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)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
73if (syntaxTree.Options.LanguageVersion() < LanguageVersion.CSharp7)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (38)
ConvertLocalFunctionToMethod\ConvertLocalFunctionToMethodTests.cs (1)
414""", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7));
EnableNullable\EnableNullableTests.cs (2)
567[InlineData(LanguageVersion.CSharp7)] 585LanguageVersion.CSharp7 => "CS8107",
ExtractMethod\ExtractLocalFunctionTests.cs (5)
3603""", CodeActionIndex, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferStaticLocalFunction, CodeStyleOption2.TrueWithSilentEnforcement), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7))); 5576await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5625await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5676await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5713await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
GenerateFromMembers\AddConstructorParametersFromMembers\AddConstructorParametersFromMembersTests.cs (3)
641LanguageVersion = LanguageVersion.CSharp7 713LanguageVersion = LanguageVersion.CSharp7, 751LanguageVersion = LanguageVersion.CSharp7
GenerateVariable\GenerateVariableTests.cs (1)
4824index: 3, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7));
IntroduceUsingStatement\IntroduceUsingStatementTests.cs (1)
22private Task TestAsync(string initialMarkup, string expectedMarkup, LanguageVersion languageVersion = LanguageVersion.CSharp7)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
1835""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7));
src\Analyzers\CSharp\Tests\MakeStructMemberReadOnly\MakeStructMemberReadOnlyTests.cs (1)
473LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
36LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (11)
92new CSharpParseOptions(LanguageVersion.CSharp7)); 108LanguageVersion.CSharp7, 157new CSharpParseOptions(LanguageVersion.CSharp7)); 191new CSharpParseOptions(LanguageVersion.CSharp7)); 219new CSharpParseOptions(LanguageVersion.CSharp7)); 255new CSharpParseOptions(LanguageVersion.CSharp7)); 401LanguageVersion.CSharp7, 716new CSharpParseOptions(LanguageVersion.CSharp7)); 749new CSharpParseOptions(LanguageVersion.CSharp7)); 778new CSharpParseOptions(LanguageVersion.CSharp7)); 812new CSharpParseOptions(LanguageVersion.CSharp7));
src\Analyzers\CSharp\Tests\UseDefaultLiteral\UseDefaultLiteralTests.cs (1)
38LanguageVersion = LanguageVersion.CSharp7
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseIndexOperatorTests.cs (1)
42LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UseIndexOrRangeOperator\UseRangeOperatorTests.cs (2)
42LanguageVersion = LanguageVersion.CSharp7, 403LanguageVersion = LanguageVersion.CSharp7,
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
103""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
26private static readonly ParseOptions CSharp7 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndMemberAccessTests.cs (4)
71LanguageVersion = LanguageVersion.CSharp7, 93LanguageVersion = LanguageVersion.CSharp7, 113LanguageVersion = LanguageVersion.CSharp7, 138LanguageVersion = LanguageVersion.CSharp7,
UseNamedArguments\UseNamedArgumentsTests.cs (1)
33LanguageVersion = LanguageVersion.CSharp7,
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ScriptTests.cs (1)
955var script = CSharpScript.Create(@"string x = default;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp7));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\BindingAsyncTests.cs (1)
3534var comp = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7));
Semantics\StackAllocInitializerTests.cs (1)
1461var parseOptions = new CSharpParseOptions().WithLanguageVersion(LanguageVersion.CSharp7);
Semantics\StackAllocSpanExpressionsTests.cs (2)
363var parseOptions = new CSharpParseOptions().WithLanguageVersion(LanguageVersion.CSharp7); 382var parseOptions = new CSharpParseOptions().WithLanguageVersion(LanguageVersion.CSharp7);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\ModifierTests.cs (1)
328CreateCompilation(code, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7)).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
LexicalAndXml\LexicalTests.cs (1)
34_options7 = new CSharpParseOptions(languageVersion: LanguageVersion.CSharp7);
Parsing\ParserErrorMessageTests.cs (1)
2791CreateCompilationWithMscorlib46(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)).VerifyDiagnostics(
Parsing\PatternParsingTests.cs (1)
6578foreach (var langVersion in new[] { LanguageVersion.CSharp6, LanguageVersion.CSharp7, LanguageVersion.CSharp8 })
Parsing\ReadOnlyStructs.cs (1)
77var comp = CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7), options: TestOptions.DebugDll);
Parsing\RefStructs.cs (1)
54var comp = CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7), options: TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
27public static readonly CSharpParseOptions Regular7 = Regular.WithLanguageVersion(LanguageVersion.CSharp7);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
125languageVersion >= LanguageVersion.CSharp7 || 204if (languageVersion >= LanguageVersion.CSharp7 && throwStatement.Expression != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
51=> options.LanguageVersion() >= LanguageVersion.CSharp7; 54=> options.LanguageVersion() >= LanguageVersion.CSharp7; 69=> options.LanguageVersion() >= LanguageVersion.CSharp7;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
167=> ((CSharpParseOptions)options).LanguageVersion >= LanguageVersion.CSharp7;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (2)
2735</Document>, languageVersion:=LanguageVersion.CSharp7, showCompletionInArgumentLists:=showCompletionInArgumentLists) 3443languageVersion:=LanguageVersion.CSharp7, showCompletionInArgumentLists:=showCompletionInArgumentLists)