46 references to CSharp2
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
699
return LanguageVersion.
CSharp2
;
LanguageVersion.cs (4)
279
case LanguageVersion.
CSharp2
:
307
case LanguageVersion.
CSharp2
:
380
case LanguageVersion.
CSharp2
:
461
result = LanguageVersion.
CSharp2
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
34
LanguageVersion.
CSharp2
,
src\Analyzers\CSharp\Tests\UseCollectionInitializer\UseCollectionInitializerTests.cs (1)
603
""", LanguageVersion.
CSharp2
);
src\Analyzers\CSharp\Tests\UseObjectInitializer\UseObjectInitializerTests.cs (1)
618
""", LanguageVersion.
CSharp2
);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (9)
CommandLineTests.cs (9)
1586
[InlineData("iso-2", LanguageVersion.
CSharp2
)]
1589
[InlineData("2", LanguageVersion.
CSharp2
)]
1590
[InlineData("2.0", LanguageVersion.
CSharp2
)]
1627
[InlineData("6", "iso-2", LanguageVersion.
CSharp2
)]
1779
InlineData(LanguageVersion.
CSharp2
, LanguageVersion.
CSharp2
),
1811
InlineData("iso-2", true, LanguageVersion.
CSharp2
),
1814
InlineData("2", true, LanguageVersion.
CSharp2
),
1815
InlineData("2.0", true, LanguageVersion.
CSharp2
),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
EnableNullable\EnableNullableTests.cs (2)
561
[InlineData(LanguageVersion.
CSharp2
)]
579
LanguageVersion.
CSharp2
=> "CS8023",
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
34
LanguageVersion.
CSharp2
,
src\Analyzers\CSharp\Tests\UseCollectionInitializer\UseCollectionInitializerTests.cs (1)
603
""", LanguageVersion.
CSharp2
);
src\Analyzers\CSharp\Tests\UseObjectInitializer\UseObjectInitializerTests.cs (1)
618
""", LanguageVersion.
CSharp2
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ImplicitlyTypedLocalsTests.cs (1)
153
CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp2
)).VerifyDiagnostics(
Semantics\SwitchTests.cs (1)
2821
CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp2
)).VerifyDiagnostics();
SourceGeneration\GeneratorDriverTests.cs (1)
3580
parseOptions = parseOptions.WithLanguageVersion(LanguageVersion.
CSharp2
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
DocumentationComments\ParameterTests.cs (1)
829
CreateCompilation(code, parseOptions: new CSharpParseOptions(LanguageVersion.
CSharp2
)).VerifyDiagnostics(
Symbols\Source\PropertyTests.cs (1)
2855
CreateCompilation(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.
CSharp2
)).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
Parsing\ParserErrorMessageTests.cs (16)
5464
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5529
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5548
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5591
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5626
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5660
tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
));
5927
CreateCompilation(test, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).VerifyDiagnostics(
6160
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6184
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6244
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6272
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6285
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6304
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6328
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6348
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
6380
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.
CSharp2
)).GetDiagnostics().Verify();
Parsing\RoundTrippingTests.cs (1)
1579
CSharpParseOptions options = new CSharpParseOptions(languageVersion: LanguageVersion.
CSharp2
);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
22
public static readonly CSharpParseOptions Regular2 = Regular.WithLanguageVersion(LanguageVersion.
CSharp2
);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
1616
await AssertCSParseOptionsAsync(CS.LanguageVersion.
CSharp2
, options => options.LanguageVersion);