209 references to CSharp6
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
659
return LanguageVersion.
CSharp6
;
LanguageVersion.cs (4)
283
case LanguageVersion.
CSharp6
:
315
case LanguageVersion.
CSharp6
:
388
case LanguageVersion.
CSharp6
:
481
result = LanguageVersion.
CSharp6
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\ConvertTypeofToNameof\CSharpConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
29
if (node.GetLanguageVersion() < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
52
if (ifStatement.SyntaxTree.Options.LanguageVersion() < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (2)
43
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
46
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
213
if (languageVersion < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
33
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
126
(languageVersion >= LanguageVersion.
CSharp6
&& IsSupportedInCSharp6(declarationKind));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
49
=> options.LanguageVersion() >= LanguageVersion.
CSharp6
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (34)
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (4)
3664
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3694
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3724
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3754
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (4)
8775
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8807
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8839
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8871
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
231
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (1)
961
LanguageVersion = LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueExpressionStatementTests.cs (1)
83
parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
30
LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
109
new CSharpParseOptions(LanguageVersion.
CSharp6
));
125
LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (1)
197
""", LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
163
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (2)
921
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
955
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs (2)
273
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
302
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (4)
875
await TestWithUseExpressionBody(code, code, LanguageVersion.
CSharp6
);
895
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
909
await TestWithUseExpressionBody(code, code, LanguageVersion.
CSharp6
);
941
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForPropertiesAnalyzerTests.cs (2)
522
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
557
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
87
""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
283
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
287
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
53
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
98
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
77
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
150
""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseTupleSwap\UseTupleSwapTests.cs (1)
42
LanguageVersion = LanguageVersion.
CSharp6
,
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
CommandLineTests.cs (8)
1597
[InlineData("6", LanguageVersion.
CSharp6
)]
1598
[InlineData("6.0", LanguageVersion.
CSharp6
)]
1624
[InlineData("7", "6", LanguageVersion.
CSharp6
)]
1630
[InlineData("iso-2", "6", LanguageVersion.
CSharp6
)]
1783
InlineData(LanguageVersion.
CSharp6
, LanguageVersion.
CSharp6
),
1823
InlineData("6", true, LanguageVersion.
CSharp6
),
1824
InlineData("6.0", true, LanguageVersion.
CSharp6
),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (56)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (53)
111
LanguageVersion = LanguageVersion.
CSharp6
,
186
LanguageVersion = LanguageVersion.
CSharp6
,
230
LanguageVersion = LanguageVersion.
CSharp6
,
326
LanguageVersion = LanguageVersion.
CSharp6
,
364
LanguageVersion = LanguageVersion.
CSharp6
,
402
LanguageVersion = LanguageVersion.
CSharp6
,
445
LanguageVersion = LanguageVersion.
CSharp6
,
487
LanguageVersion = LanguageVersion.
CSharp6
,
548
LanguageVersion = LanguageVersion.
CSharp6
,
616
LanguageVersion = LanguageVersion.
CSharp6
,
878
LanguageVersion = LanguageVersion.
CSharp6
,
950
LanguageVersion = LanguageVersion.
CSharp6
,
994
LanguageVersion = LanguageVersion.
CSharp6
,
1049
LanguageVersion = LanguageVersion.
CSharp6
,
1102
LanguageVersion = LanguageVersion.
CSharp6
,
1147
LanguageVersion = LanguageVersion.
CSharp6
,
1190
LanguageVersion = LanguageVersion.
CSharp6
,
1234
LanguageVersion = LanguageVersion.
CSharp6
,
1286
LanguageVersion = LanguageVersion.
CSharp6
,
1494
LanguageVersion = LanguageVersion.
CSharp6
,
1532
LanguageVersion = LanguageVersion.
CSharp6
,
1570
LanguageVersion = LanguageVersion.
CSharp6
,
1614
LanguageVersion = LanguageVersion.
CSharp6
,
1658
LanguageVersion = LanguageVersion.
CSharp6
,
1710
LanguageVersion = LanguageVersion.
CSharp6
,
1764
LanguageVersion = LanguageVersion.
CSharp6
,
1816
LanguageVersion = LanguageVersion.
CSharp6
,
1860
LanguageVersion = LanguageVersion.
CSharp6
,
1904
LanguageVersion = LanguageVersion.
CSharp6
,
1956
LanguageVersion = LanguageVersion.
CSharp6
,
2000
LanguageVersion = LanguageVersion.
CSharp6
,
2043
LanguageVersion = LanguageVersion.
CSharp6
,
2088
LanguageVersion = LanguageVersion.
CSharp6
,
2131
LanguageVersion = LanguageVersion.
CSharp6
,
2166
LanguageVersion = LanguageVersion.
CSharp6
,
2339
LanguageVersion = LanguageVersion.
CSharp6
,
2383
LanguageVersion = LanguageVersion.
CSharp6
,
2431
LanguageVersion = LanguageVersion.
CSharp6
,
2486
LanguageVersion = LanguageVersion.
CSharp6
,
2544
LanguageVersion = LanguageVersion.
CSharp6
,
2618
LanguageVersion = LanguageVersion.
CSharp6
,
2663
LanguageVersion = LanguageVersion.
CSharp6
,
2870
LanguageVersion = LanguageVersion.
CSharp6
,
3145
LanguageVersion = LanguageVersion.
CSharp6
,
3155
LanguageVersion = LanguageVersion.
CSharp6
,
3308
LanguageVersion = LanguageVersion.
CSharp6
,
3373
LanguageVersion = LanguageVersion.
CSharp6
,
3441
LanguageVersion = LanguageVersion.
CSharp6
,
3520
LanguageVersion = LanguageVersion.
CSharp6
,
3591
LanguageVersion = LanguageVersion.
CSharp6
,
3666
LanguageVersion = LanguageVersion.
CSharp6
,
3744
LanguageVersion = LanguageVersion.
CSharp6
,
3822
LanguageVersion = LanguageVersion.
CSharp6
,
CodeActions\InitializeParameter\AddParameterCheckTests.cs (2)
91
LanguageVersion = LanguageVersion.
CSharp6
,
893
LanguageVersion = LanguageVersion.
CSharp6
,
GenerateConstructors\GenerateConstructorsTests.cs (1)
1386
parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenDeconstructTests.cs (1)
5371
var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.
CSharp6
), options: TestOptions.DebugExe, references: s_valueTupleRefs);
CodeGen\CodeGenExprLambdaTests.cs (1)
3839
CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
CodeGen\CodeGenRefLocalTests.cs (1)
4003
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
CodeGen\CodeGenRefReturnTests.cs (5)
2304
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
2339
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
2381
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
2402
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
2431
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\OutVarTests.cs (3)
50
var compilation = CreateCompilation(text, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
82
var compilation = CreateCompilation(text, options: TestOptions.ReleaseDll, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
599
var compilation = CreateCompilation(text, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
Microsoft.CodeAnalysis.CSharp.Features (7)
src\Analyzers\CSharp\Analyzers\ConvertTypeofToNameof\CSharpConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
29
if (node.GetLanguageVersion() < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
52
if (ifStatement.SyntaxTree.Options.LanguageVersion() < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (2)
43
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
46
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
213
if (languageVersion < LanguageVersion.
CSharp6
)
src\Analyzers\CSharp\Analyzers\UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
33
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
46
=> compilation.LanguageVersion() >= LanguageVersion.
CSharp6
;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (44)
EnableNullable\EnableNullableTests.cs (2)
565
[InlineData(LanguageVersion.
CSharp6
)]
583
LanguageVersion.
CSharp6
=> "CS8059",
ExtractMethod\ExtractLocalFunctionTests.cs (1)
4122
await TestExactActionSetOfferedAsync(code, [FeaturesResources.Extract_method], new TestParameters(parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)));
InlineTemporary\InlineTemporaryTests.cs (1)
4299
[InlineData(LanguageVersion.
CSharp6
)]
IntroduceVariable\IntroduceVariableTests.cs (1)
5535
await TestAsync(code, expected, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
InvertIf\InvertIfTests.cs (1)
1198
""", LanguageVersion.
CSharp6
);
InvertLogical\InvertLogicalTests.cs (1)
19
private static readonly ParseOptions CSharp6 = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
);
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
5124
parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (4)
3664
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3694
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3724
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
3754
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (4)
8775
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8807
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8839
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
8871
parseOptions: TestOptions.Regular.WithLanguageVersion(CodeAnalysis.CSharp.LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
231
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (1)
961
LanguageVersion = LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueExpressionStatementTests.cs (1)
83
parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
30
LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
109
new CSharpParseOptions(LanguageVersion.
CSharp6
));
125
LanguageVersion.
CSharp6
,
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.cs (1)
197
""", LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
163
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs (2)
921
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
955
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs (2)
273
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
302
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (4)
875
await TestWithUseExpressionBody(code, code, LanguageVersion.
CSharp6
);
895
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
909
await TestWithUseExpressionBody(code, code, LanguageVersion.
CSharp6
);
941
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForPropertiesAnalyzerTests.cs (2)
522
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
557
await TestWithUseExpressionBody(code, fixedCode, LanguageVersion.
CSharp6
);
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
87
""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
283
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
287
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
53
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
98
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
77
""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
150
""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
src\Analyzers\CSharp\Tests\UseTupleSwap\UseTupleSwapTests.cs (1)
42
LanguageVersion = LanguageVersion.
CSharp6
,
UseExpressionBody\Refactoring\UseExpressionBodyForPropertiesRefactoringTests.cs (1)
308
}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
),
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzerTests.cs (1)
64
""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\BindingAsyncTests.cs (2)
993
CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics();
1022
CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics();
Semantics\ConstantTests.cs (1)
3280
CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
Semantics\LocalFunctionTests.cs (1)
4012
CreateCompilation(source, options: option, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
Semantics\NameOfTests.cs (2)
618
parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
637
parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
Semantics\ScriptSemanticsTests.cs (1)
485
var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script.WithLanguageVersion(LanguageVersion.
CSharp6
));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CompilationAPITests.cs (6)
682
syntaxTrees: new SyntaxTree[] { SyntaxFactory.ParseSyntaxTree("public class C {}", options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)) },
692
options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)) },
703
options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)) },
716
options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)) },
2379
var tree1 = SyntaxFactory.ParseSyntaxTree("", CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
2380
var tree2 = SyntaxFactory.ParseSyntaxTree("", CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2750
var tree = SyntaxFactory.ParseSyntaxTree(test, options: new CSharpParseOptions(languageVersion: LanguageVersion.
CSharp6
));
Symbols\ExtensionMethodTests.cs (1)
2423
var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script.WithLanguageVersion(LanguageVersion.
CSharp6
));
Symbols\Source\FieldTests.cs (1)
341
CreateCompilationWithMscorlib46(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
Symbols\SymbolErrorTests.cs (1)
1169
CreateCompilationWithMscorlib46(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (15)
IncrementalParsing\IncrementalParsingTests.cs (1)
41
=> Parse(text, LanguageVersion.
CSharp6
);
LexicalAndXml\LexicalTests.cs (1)
33
_options6 = new CSharpParseOptions(languageVersion: LanguageVersion.
CSharp6
);
Parsing\ExpressionParsingTests.cs (1)
764
var expr = this.ParseExpression(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
Parsing\LocalFunctionParsingTests.cs (1)
1287
var file = ParseFile(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
Parsing\ParserErrorMessageTests.cs (6)
2739
ParseAndValidate(text, TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
),
2768
CreateCompilationWithMscorlib46(text, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
2902
ParseAndValidate(test, TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
),
4626
ParseAndValidate(test, TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
),
5694
var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
));
6475
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp6
)).GetDiagnostics().Verify();
Parsing\ParsingErrorRecoveryTests.cs (2)
6228
var file = this.ParseTree(text, TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
6339
var file = this.ParseTree(text, options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
));
Parsing\PatternParsingTests.cs (2)
50
CreateCompilation(test, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
)).VerifyDiagnostics(
6578
foreach (var langVersion in new[] { LanguageVersion.
CSharp6
, LanguageVersion.CSharp7, LanguageVersion.CSharp8 })
Parsing\SeparatedSyntaxListParsingTests.cs (1)
735
var tree = UsingTree(text, TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp6
),
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
26
public static readonly CSharpParseOptions Regular6 = Regular.WithLanguageVersion(LanguageVersion.
CSharp6
);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
126
(languageVersion >= LanguageVersion.
CSharp6
&& IsSupportedInCSharp6(declarationKind));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
49
=> options.LanguageVersion() >= LanguageVersion.
CSharp6
;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (1)
66
Assert.Equal(LanguageVersion.
CSharp6
, options.LanguageVersion);