353 instantiations of CSharpParseOptions
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.CodeAnalysis.CSharp (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (90)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (27)
2728""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
2783""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
3002""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3019""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
3114""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3137""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
3251""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
5466""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9));
8229""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8245""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8269""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8293""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8313""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8464""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8487""", PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
8878""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3));
8916""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9118""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9139""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
9156""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9182""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9250""", options: PreferDiscard, parseOptions: new CSharpParseOptions(languageVersion));
9268""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
9300""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (19)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (105)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (27)
2728""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
2762""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
2783""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
3002""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3019""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
3114""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3137""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
3251""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
3288""", optionName: optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp9));
5466""", optionName, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
7769""", PreferDiscard, new CSharpParseOptions(LanguageVersion.CSharp9));
8229""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8245""", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8269""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8293""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8313""", optionName: nameof(PreferDiscard), parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8464""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
8487""", PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion));
8878""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3));
8916""", options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9118""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9139""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
9156""", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8)));
9182""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
9250""", options: PreferDiscard, parseOptions: new CSharpParseOptions(languageVersion));
9268""", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
9300""", options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Semantics\ScriptSemanticsTests.cs (11)
1179var compilationUnit = CSharp.SyntaxFactory.ParseCompilationUnit(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1207syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1216syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1225syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1237syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1249syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1267var compilationUnit = CSharp.SyntaxFactory.ParseCompilationUnit("\nSystem.Console.WriteLine(1);", options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1269var syntaxTree2 = SyntaxFactory.ParseSyntaxTree("System.Console.WriteLine(2);", options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1306var compilationUnit = CSharp.SyntaxFactory.ParseCompilationUnit(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1336syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
1351syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: new CSharp.CSharpParseOptions(kind: SourceCodeKind.Script));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (41)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Features.UnitTests (2)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (10)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
Microsoft.DotNet.GenFacades (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
StackDepthTest (1)
1732 references to CSharpParseOptions
IdeCoreBenchmarks (1)
Microsoft.Analyzers.Extra.Tests (2)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (4)
Microsoft.CodeAnalysis.CSharp (122)
SourceGeneration\CSharpGeneratorDriver.cs (8)
23/// <param name="parseOptions">The <see cref="CSharpParseOptions"/> that should be used when parsing generated files.</param>
27internal CSharpGeneratorDriver(CSharpParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, GeneratorDriverOptions driverOptions)
58/// <param name="parseOptions">The <see cref="CSharpParseOptions"/> that should be used when parsing generated files, or <c>null</c> to use <see cref="CSharpParseOptions.Default"/></param>
62public static CSharpGeneratorDriver Create(IEnumerable<ISourceGenerator> generators, IEnumerable<AdditionalText>? additionalTexts = null, CSharpParseOptions? parseOptions = null, AnalyzerConfigOptionsProvider? optionsProvider = null, GeneratorDriverOptions driverOptions = default)
63=> new CSharpGeneratorDriver(parseOptions ?? CSharpParseOptions.Default, generators.ToImmutableArray(), optionsProvider ?? CompilerAnalyzerConfigOptionsProvider.Empty, additionalTexts.AsImmutableOrEmpty(), driverOptions);
67public static CSharpGeneratorDriver Create(IEnumerable<ISourceGenerator> generators, IEnumerable<AdditionalText>? additionalTexts, CSharpParseOptions? parseOptions, AnalyzerConfigOptionsProvider? optionsProvider)
71=> CSharpSyntaxTree.ParseTextLazy(input.Text, (CSharpParseOptions)_state.ParseOptions, fileName);
Syntax\CSharpSyntaxTree.cs (18)
57public new abstract CSharpParseOptions Options { get; }
314public static SyntaxTree Create(CSharpSyntaxNode root, CSharpParseOptions? options = null, string? path = "", Encoding? encoding = null)
332CSharpParseOptions? options,
350options: options ?? CSharpParseOptions.Default,
359CSharpParseOptions options,
380internal static SyntaxTree CreateForDebugger(CSharpSyntaxNode root, SourceText text, CSharpParseOptions options)
393/// <para>NOTE: Do not use this method elsewhere, instead use <see cref="Create(CSharpSyntaxNode, CSharpParseOptions, string, Encoding)"/> method for creating a syntax tree.</para>
404options: CSharpParseOptions.Default,
417CSharpParseOptions? options = null,
420return new LazySyntaxTree(text, options ?? CSharpParseOptions.Default, path, diagnosticOptions: null);
432CSharpParseOptions? options = null,
453CSharpParseOptions? options,
472CSharpParseOptions? options = null,
492CSharpParseOptions? options,
503options = options ?? CSharpParseOptions.Default;
912CSharpParseOptions? options,
923CSharpParseOptions? options,
935CSharpParseOptions? options,
Syntax\SyntaxFactory.cs (29)
1548=> CSharpSyntaxTree.Create((CSharpSyntaxNode)root, (CSharpParseOptions?)options ?? CSharpParseOptions.Default, path, encoding, SourceHashAlgorithm.Sha1);
1554/// <inheritdoc cref="CSharpSyntaxTree.ParseText(string, CSharpParseOptions?, string, Encoding?, CancellationToken)"/>
1562return CSharpSyntaxTree.ParseText(SourceText.From(text, encoding, SourceHashAlgorithm.Sha1), (CSharpParseOptions?)options, path, diagnosticOptions: null, isGeneratedCode: null, cancellationToken);
1566/// <inheritdoc cref="CSharpSyntaxTree.ParseText(SourceText, CSharpParseOptions?, string, CancellationToken)"/>
1573return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, cancellationToken);
1584return ParseLeadingTrivia(text, CSharpParseOptions.Default, offset);
1590internal static SyntaxTriviaList ParseLeadingTrivia(string text, CSharpParseOptions options, int offset = 0)
1603using (var lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), CSharpParseOptions.Default))
1622SyntaxTriviaList leadingTrivia = ParseLeadingTrivia(commentText, CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Diagnose));
1640using (var lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), CSharpParseOptions.Default))
1656public static IEnumerable<SyntaxToken> ParseTokens(string text, int offset = 0, int initialTokenPosition = 0, CSharpParseOptions? options = null)
1658using (var lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), options ?? CSharpParseOptions.Default))
1682public static SyntaxTokenParser CreateTokenParser(SourceText sourceText, CSharpParseOptions? options = null)
1684return new SyntaxTokenParser(new InternalSyntax.Lexer(sourceText, options ?? CSharpParseOptions.Default));
1716using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1735using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1754using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1774using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1795public static CompilationUnitSyntax ParseCompilationUnit(string text, int offset = 0, CSharpParseOptions? options = null)
1817using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1836using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1855using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1874using (var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1893using var lexer = MakeLexer(text, offset, (CSharpParseOptions?)options);
1916private static InternalSyntax.Lexer MakeLexer(string text, int offset, CSharpParseOptions? options = null)
1920options: options ?? CSharpParseOptions.Default);
2803return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, diagnosticOptions, isGeneratedCode: null, cancellationToken);
2832return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, diagnosticOptions, isGeneratedCode, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (75)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (10)
80""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(version)));
98""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
1166""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1205""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1471""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1502""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1557""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1589""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1652""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1694""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (5)
176BaseFieldDeclarationSyntax => SyntaxFactory.ParseCompilationUnit(WrapInType(textToParse), options: (CSharpParseOptions)tree.Options),
177BaseMethodDeclarationSyntax => SyntaxFactory.ParseCompilationUnit(WrapInType(textToParse), options: (CSharpParseOptions)tree.Options),
178BasePropertyDeclarationSyntax => SyntaxFactory.ParseCompilationUnit(WrapInType(textToParse), options: (CSharpParseOptions)tree.Options),
179StatementSyntax => SyntaxFactory.ParseStatement(textToParse, options: (CSharpParseOptions)tree.Options),
180UsingDirectiveSyntax => SyntaxFactory.ParseCompilationUnit(textToParse, options: (CSharpParseOptions)tree.Options),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (49)
Extensions\ContextQuery\AbstractContextTests.cs (10)
16private void VerifyWorker(string markup, bool validLocation, CSharpParseOptions options = null)
33CSharpParseOptions options)
44private void VerifyInFrontOfComment(string text, int position, bool validLocation, CSharpParseOptions options)
47private void VerifyInFrontOfComment_TypePartiallyWritten(string text, int position, bool validLocation, CSharpParseOptions options)
55CSharpParseOptions options)
65private void VerifyAtPosition(string text, int position, bool validLocation, CSharpParseOptions options)
68private void VerifyAtPosition_TypePartiallyWritten(string text, int position, bool validLocation, CSharpParseOptions options)
76CSharpParseOptions options)
92private void VerifyAtEndOfFile(string text, int position, bool validLocation, CSharpParseOptions options)
95private void VerifyAtEndOfFile_TypePartiallyWritten(string text, int position, bool validLocation, CSharpParseOptions options)
Formatting\FormattingEngineTests.cs (6)
2712AssertFormatWithView(expected, code, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
2737AssertFormatWithView(expected, code, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
2762AssertFormatWithView(expected, code, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
2782AssertFormatAfterTypeChar(code, expected, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
2802AssertFormatAfterTypeChar(code, expected, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
2822AssertFormatAfterTypeChar(code, expected, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp12));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (17)
Recommendations\RecommenderTests.cs (17)
25protected static readonly CSharpParseOptions CSharp9ParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
30internal async Task VerifyWorkerAsync(string markup, bool absent, CSharpParseOptions? options = null, int? matchPriority = null)
46CSharpParseOptions? options,
56private Task CheckResultAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
108private Task VerifyInFrontOfCommentAsync(string text, int cursorPosition, bool absent, CSharpParseOptions? options, int? matchPriority)
111private Task VerifyInFrontOfComment_KeywordPartiallyWrittenAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
119CSharpParseOptions? options,
129private Task VerifyAtPositionAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
132private Task VerifyAtPosition_KeywordPartiallyWrittenAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
140CSharpParseOptions? options,
156private Task VerifyAtEndOfFileAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
159private Task VerifyAtEndOfFile_KeywordPartiallyWrittenAsync(string text, int position, bool absent, CSharpParseOptions? options, int? matchPriority)
164CSharpParseOptions? options = null,
165CSharpParseOptions? scriptOptions = null)
188CSharpParseOptions? options = null,
189CSharpParseOptions? scriptOptions = null)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (40)
Emit\CompilationEmitTests.cs (20)
262", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.None));
307", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.None));
353", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Diagnose));
407", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Diagnose));
463", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Diagnose));
516", assemblyName: "test", parseOptions: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Parse));
2130var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
2261var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
2328var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
2395var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
2455var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
2500var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4672var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4757var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4802var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4858var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4889var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4937var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
4966var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
5014var parseOptions = TestOptions.Regular.WithNoRefSafetyRulesAttribute();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (22)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (139)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (19)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (139)
IntroduceParameter\IntroduceParameterTests.cs (14)
436await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
480await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
524await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
568await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
630await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
692await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
754await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
799await TestInRegularAndScriptAsync(code, expected, index: 4, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
833await TestInRegularAndScriptAsync(code, expected, index: 2, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
876await TestInRegularAndScriptAsync(code, expected, index: 2, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
911await TestInRegularAndScriptAsync(code, expected, index: 2, options: UseExpressionBody, parseOptions: CSharpParseOptions.Default);
950await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
1325await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
1360await TestInRegularAndScriptAsync(code, expected, index: 1, options: new OptionsCollection(GetLanguage()), parseOptions: CSharpParseOptions.Default);
IntroduceVariable\IntroduceVariableTests.cs (7)
9134""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9164""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9200""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9236""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9266""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9296""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
9325""", index: 1, parseOptions: CSharpParseOptions.Default, options: ImplicitTypingEverywhere());
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (10)
80""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(version)));
98""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
1166""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1205""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1471""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1502""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1557""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1589""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1652""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
1694""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting (2)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (335)
SourceGeneration\GeneratorDriverTests.cs (118)
34var parseOptions = TestOptions.Regular;
54var parseOptions = TestOptions.Regular;
76var parseOptions = TestOptions.Regular;
97var parseOptions = TestOptions.Regular;
126var parseOptions = TestOptions.Regular;
155var parseOptions = TestOptions.Regular;
216var parseOptions = TestOptions.Regular;
248var parseOptions = TestOptions.Regular;
273var parseOptions = TestOptions.Regular;
296var parseOptions = TestOptions.Regular;
317var parseOptions = TestOptions.Regular;
340var parseOptions = TestOptions.Regular;
370var parseOptions = TestOptions.Regular;
401var parseOptions = TestOptions.Regular;
427var parseOptions = TestOptions.Regular;
453var parseOptions = TestOptions.Regular;
482var parseOptions = TestOptions.Regular.WithLanguageVersion(LanguageVersion.Preview);
521var parseOptions = TestOptions.Regular;
581var parseOptions = TestOptions.Regular;
611var parseOptions = TestOptions.Regular;
656var parseOptions = TestOptions.Regular;
703var parseOptions = TestOptions.Regular;
738var parseOptions = TestOptions.Regular;
775var parseOptions = TestOptions.Regular;
797var parseOptions = TestOptions.Regular;
822var parseOptions = TestOptions.Regular;
850var parseOptions = TestOptions.Regular;
881var parseOptions = TestOptions.Regular;
907var parseOptions = TestOptions.Regular;
934var parseOptions = TestOptions.Regular;
962var parseOptions = TestOptions.Regular;
994var parseOptions = TestOptions.Regular;
1023var parseOptions = TestOptions.Regular;
1058var parseOptions = TestOptions.Regular;
1085var parseOptions = TestOptions.Regular;
1130var parseOptions = TestOptions.Regular;
1157var parseOptions = TestOptions.Regular;
1255var parseOptions = TestOptions.Regular;
1346var parseOptions = TestOptions.RegularPreview;
1384var parseOptions = TestOptions.Regular;
1419var parseOptions = TestOptions.Regular;
1441var parseOptions = TestOptions.RegularPreview;
1466var parseOptions = TestOptions.RegularPreview;
1492var parseOptions = TestOptions.RegularPreview;
1534var parseOptions = TestOptions.RegularPreview;
1582var parseOptions = TestOptions.RegularPreview;
1611var parseOptions = TestOptions.RegularPreview;
1644var parseOptions = TestOptions.RegularPreview;
1665var parseOptions = TestOptions.RegularPreview;
1727var parseOptions = TestOptions.RegularPreview;
1771var parseOptions = TestOptions.RegularPreview;
1990var parseOptions = TestOptions.RegularPreview;
2026var parseOptions = TestOptions.RegularPreview;
2182var parseOptions = TestOptions.RegularPreview;
2214static void replace(ref Compilation compilation, CSharpParseOptions parseOptions, string source)
2241var parseOptions = TestOptions.RegularPreview;
2276static void replace(ref Compilation compilation, CSharpParseOptions parseOptions, string source)
2288var parseOptions = TestOptions.RegularPreview;
2350var parseOptions = TestOptions.RegularPreview;
2419static void replace(ref Compilation compilation, CSharpParseOptions parseOptions, string source)
2431var parseOptions = TestOptions.RegularPreview;
2503var parseOptions = TestOptions.RegularPreview;
2545var parseOptions = TestOptions.RegularPreview;
2585var parseOptions = TestOptions.RegularPreview;
2613var parseOptions = TestOptions.RegularPreview;
2646var newParseOptions = parseOptions.WithDocumentationMode(DocumentationMode.Diagnose);
2676var parseOptions = TestOptions.RegularPreview;
2742var parseOptions = TestOptions.RegularPreview;
2826var parseOptions = TestOptions.RegularPreview;
3013var parseOptions = TestOptions.RegularPreview;
3208var parseOptions = TestOptions.RegularPreview;
3274var parseOptions = TestOptions.RegularPreview;
3320var parseOptions = TestOptions.RegularPreview;
3350var parseOptions = TestOptions.RegularPreview;
3408var parseOptions = TestOptions.RegularPreview;
3434var parseOptions = TestOptions.RegularPreview;
3467var parseOptions = TestOptions.RegularPreview;
3513var parseOptions = TestOptions.RegularPreview;
3541var parseOptions = TestOptions.RegularPreview;
3572var parseOptions = TestOptions.RegularPreview;
3620var parseOptions = TestOptions.RegularPreview;
3664var parseOptions = TestOptions.RegularPreview;
3695var parseOptions = TestOptions.RegularPreview;
3739var parseOptions = TestOptions.RegularPreview;
3771var parseOptions = TestOptions.RegularPreview;
3805var parseOptions = TestOptions.RegularPreview;
3834var parseOptions = TestOptions.RegularPreview;
3865var parseOptions = TestOptions.RegularPreview;
3897var parseOptions = TestOptions.RegularPreview;
3930var parseOptions = TestOptions.RegularPreview;
3959var parseOptions = TestOptions.RegularPreview;
3989var parseOptions = TestOptions.RegularPreview;
4021var parseOptions = TestOptions.RegularPreview;
4135var parseOptions = TestOptions.RegularPreview;
4197var parseOptions = TestOptions.RegularPreview;
4231static void replace(ref Compilation compilation, CSharpParseOptions parseOptions, string className, string source)
4279var parseOptions = TestOptions.RegularPreview.WithFeature("InterceptorsNamespaces", "global");
4484var parseOptions = CSharpParseOptions.Default;
4592var parseOptions = CSharpParseOptions.Default;
4613var parseOptions = CSharpParseOptions.Default;
4622var newParseOptions = parseOptions.WithLanguageVersion(LanguageVersion.CSharp9);
4649var parseOptions = CSharpParseOptions.Default;
4666var parseOptions = CSharpParseOptions.Default;
4684var parseOptions = CSharpParseOptions.Default;
4704var parseOptions = CSharpParseOptions.Default;
4722var parseOptions = CSharpParseOptions.Default;
4740var parseOptions = CSharpParseOptions.Default;
4757var parseOptions = CSharpParseOptions.Default;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (91)
Symbols\StaticAbstractMembersInInterfacesTests.cs (30)
16192foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
16673foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
16853foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
16935foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
17017foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
17088foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
17162foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
17249foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
19920foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
19994foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
20077foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
20157foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
21285foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
21345foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
21448foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
21691foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
21800foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
21902foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
23210foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
24771foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
25013foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
25084foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
25897foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
27436foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
27679foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
27750foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
28884foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
29509foreach (var parseOptions in new[] { TestOptions.RegularPreview, TestOptions.Regular10 })
29626foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
29732foreach (var parseOptions in new[] { TestOptions.Regular10, TestOptions.RegularPreview })
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (399)
Parsing\CrefParsingTests.cs (7)
21protected override SyntaxTree ParseTree(string text, CSharpParseOptions options)
26protected override CSharpSyntaxNode ParseNode(string text, CSharpParseOptions options)
29var trivia = SyntaxFactory.ParseLeadingTrivia(commentText, options ?? CSharpParseOptions.Default).Single();
350foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
365foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
381foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
397foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
Parsing\CSharpParseOptionsTests.cs (33)
20private void TestProperty<T>(Func<CSharpParseOptions, T, CSharpParseOptions> factory, Func<CSharpParseOptions, T> getter, T validValue)
22var oldOpt1 = CSharpParseOptions.Default;
23var newOpt1 = factory(oldOpt1, validValue);
24var newOpt2 = factory(newOpt1, validValue);
35var po = new CSharpParseOptions().WithFeatures(new[] { kvp });
37var po2 = po.WithDocumentationMode(DocumentationMode.Diagnose);
49Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols(default(ImmutableArray<string>)).PreprocessorSymbols.Length);
50Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols((IEnumerable<string>)null).PreprocessorSymbols.Length);
51Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols((string[])null).PreprocessorSymbols.Length);
55/// If this test fails, please update the <see cref="CSharpParseOptions.GetHashCode"/>
56/// and <see cref="CSharpParseOptions.Equals(CSharpParseOptions)"/> methods to
64typeof(CSharpParseOptions),
77var options = new CSharpParseOptions();
117var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script);
118var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script);
134var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script);
135var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script);
152var options = new CSharpParseOptions(kind: SourceCodeKind.Interactive);
163var options = new CSharpParseOptions(documentationMode: unchecked((DocumentationMode)100));
173var options = new CSharpParseOptions(languageVersion: unchecked((LanguageVersion)10000));
183var options = new CSharpParseOptions(preprocessorSymbols: new[] { "test", "1" });
194var options = new CSharpParseOptions().WithKind(SourceCodeKind.Interactive);
205var options = new CSharpParseOptions().WithDocumentationMode(unchecked((DocumentationMode)100));
215var options = new CSharpParseOptions().WithLanguageVersion(unchecked((LanguageVersion)10000));
225var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "" });
235var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { " " });
245var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", "Bad.Symbol" });
255var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", "Bad\\Symbol" });
265var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", null });
Parsing\ExpressionParsingTests.cs (14)
20protected override SyntaxTree ParseTree(string text, CSharpParseOptions options)
211}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_3)).VerifyDiagnostics(
241}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)).VerifyDiagnostics();
267}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_3)).VerifyDiagnostics(
316}}", parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)).VerifyDiagnostics();
731var expr = this.ParseExpression(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
764var expr = this.ParseExpression(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6));
6608foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6631foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6666foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6701foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6724foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6759foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
6794foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
Parsing\MemberDeclarationParsingTests.cs (205)
28private static readonly CSharpParseOptions RequiredMembersOptions = TestOptions.Regular11;
117foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
142foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
153foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
171foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
200foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
248foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
299foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
326foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
369foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
428foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
479foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
562foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
645foreach (var options in new[] { TestOptions.RegularPreview, TestOptions.Regular10, TestOptions.Regular11 })
776foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
824foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
872foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
915foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
958foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1005foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1052foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1086foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1134foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1168foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
1200public void RequiredModifierProperty_01(CSharpParseOptions parseOptions)
1227public void RequiredModifierProperty_02(CSharpParseOptions parseOptions)
1275public void RequiredModifierProperty_04(CSharpParseOptions parseOptions)
1369public void RequiredModifierField_01(CSharpParseOptions parseOptions)
1393public void RequiredModifierField_02(CSharpParseOptions parseOptions)
1438public void RequiredModifierField_04(CSharpParseOptions parseOptions)
1480public void RequiredModifierMethod_01(CSharpParseOptions parseOptions)
1508public void RequiredModifierMethod_02(CSharpParseOptions parseOptions)
1556public void RequiredModifierOperator(CSharpParseOptions parseOptions)
1603public void RequiredModifierConversion_01(CSharpParseOptions parseOptions)
1641public void RequiredModifierConversion_02(CSharpParseOptions parseOptions)
1710public void RequiredModifierIncompleteProperty_01(CSharpParseOptions parseOptions)
1741public void RequiredModifierIncompleteProperty_02(CSharpParseOptions parseOptions)
1767public void RequiredModifierIncompleteMember_01(CSharpParseOptions parseOptions)
1795public void RequiredModifierIncompleteMember_02(CSharpParseOptions parseOptions)
1815public void RequiredModifierIncompleteMember_03(CSharpParseOptions parseOptions)
1835public void RequiredModifierIncompleteMember_04(CSharpParseOptions parseOptions)
2254public void RequiredModifier_LocalNamedRequired_TopLevelStatements(CSharpParseOptions parseOptions)
2347foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2489foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2613foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2719foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2825foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2879foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
2959foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3014foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3065foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3125foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3228foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3373foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3501foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3611foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3721foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3779foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3863foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3922foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
3977foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4041foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4116foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4178foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4267foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4401foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4518foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4617foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4716foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4769foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4848foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4902foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
4952foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5011foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5107foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5245foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5366foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5469foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5572foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5629foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5712foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5824foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5887foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
5961foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6022foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6084foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6159foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6229foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6292foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6392foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6459foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6543foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6643foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6696foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6758foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6812foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6862foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
6921foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7017foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7130foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7234foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7338foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7442foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7499foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7565foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7623foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7677foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7740foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7814foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7875foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7937foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
7994foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8048foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8102foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8161foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8207foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8272foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8321foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8382foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8441foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8487foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8545foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8890foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
8944foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
9006foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
9068foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
9114foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
11920UsingTree(text, options: CSharpParseOptions.Default.WithDocumentationMode(DocumentationMode.Parse),
12414foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
12677foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
12769foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
12844foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
12927foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13010foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13097foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13181foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13260foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13339foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13426foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13513foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13604foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13715foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13789foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13863foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
13945foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14027foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14106foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14192foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14275foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14369foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14460foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14546foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14629foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14704foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14779foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14862foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
14945foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15076foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15210foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15268foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15326foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15384foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15442foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15521foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15600foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15683foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15861foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
15942foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16036foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16150foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16303foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16473foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16582foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16711foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
16892foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17090foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17160foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17224foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17281foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17354foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17421foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17483foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17553foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17637foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17700foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17854foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17906foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
17980foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18069foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18170foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18274foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18375foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18473foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18522foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18583foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18708foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18787foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18883foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
18978foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
19059foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
19141foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
19213foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
Parsing\ParserErrorMessageTests.cs (44)
5439var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5442tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1));
5461var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5464tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5526var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5529tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5545var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5548tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5588var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5591tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5623var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5626tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5657var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5660tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2));
5694var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6));
5697tree = Parse(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5927CreateCompilation(test, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).VerifyDiagnostics(
5946var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5964var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5977var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
5985tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3));
6006var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
6013tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3));
6036var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
6049tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4));
6078var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
6091tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4));
6148SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().Verify();
6149SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify();
6160SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify();
6161SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify();
6184SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify();
6185SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify();
6215SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().Verify();
6216SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify();
6243SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify();
6244SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify();
6271SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().Verify();
6272SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify();
6365var tree = SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
6380SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().Verify();
6381SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().Verify();
6475SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)).GetDiagnostics().Verify();
6477SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)).GetDiagnostics().Verify();
Parsing\ParsingTests.cs (7)
64public static void ParseAndValidate(string text, CSharpParseOptions options, params DiagnosticDescription[] expectedErrors)
78protected virtual SyntaxTree ParseTree(string text, CSharpParseOptions? options) => SyntaxFactory.ParseSyntaxTree(text, options);
80public CompilationUnitSyntax ParseFile(string text, CSharpParseOptions? parseOptions = null) =>
86protected virtual CSharpSyntaxNode ParseNode(string text, CSharpParseOptions? options) =>
150protected SyntaxTree UsingTree(string text, CSharpParseOptions? options, params DiagnosticDescription[] expectedErrors)
177protected CSharpSyntaxNode UsingNode(string text, CSharpParseOptions options, params DiagnosticDescription[] expectedErrors)
371var lexer = new Syntax.InternalSyntax.Lexer(Text.SourceText.From(text), CSharpParseOptions.Default);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (108)
CSharpTestBase.cs (47)
825CSharpParseOptions parseOptions = null,
861CSharpParseOptions parseOptions = null,
898CSharpParseOptions parseOptions = null,
939CSharpParseOptions parseOptions = null,
975CSharpParseOptions parseOptions = null,
1011CSharpParseOptions parseOptions = null,
1095public static SyntaxTree Parse(string text, string filename = "", CSharpParseOptions options = null, Encoding encoding = null, SourceHashAlgorithm checksumAlgorithm = SourceHashAlgorithm.Sha1)
1098public static SyntaxTree[] Parse(IEnumerable<string> sources, CSharpParseOptions options = null)
1108public static SyntaxTree[] Parse(CSharpParseOptions options = null, params string[] sources)
1118public static SyntaxTree ParseWithRoundTripCheck(string text, CSharpParseOptions options = null)
1137CSharpParseOptions parseOptions = null,
1146CSharpParseOptions parseOptions = null,
1158CSharpParseOptions parseOptions = null,
1166CSharpParseOptions parseOptions = null,
1175CSharpParseOptions parseOptions = null,
1184CSharpParseOptions parseOptions = null,
1193CSharpParseOptions parseOptions = null,
1202CSharpParseOptions parseOptions = null,
1210CSharpParseOptions parseOptions = null,
1218CSharpParseOptions parseOptions = null,
1226CSharpParseOptions parseOptions = null,
1234CSharpParseOptions parseOptions = null,
1242CSharpParseOptions parseOptions = null,
1255CSharpParseOptions parseOptions = null,
1282CSharpParseOptions parseOptions = null,
1295CSharpParseOptions parseOptions = null,
1305CSharpParseOptions parseOptions,
1430var options = (CSharpParseOptions)trees[0].Options;
1454CSharpParseOptions parseOptions = null)
1471CSharpParseOptions parseOptions = null,
1494CSharpParseOptions parseOptions = null,
2071CSharpParseOptions parseOptions = null,
2123CSharpParseOptions parseOptions = null,
2159CSharpParseOptions parseOptions = null,
2180CSharpParseOptions parseOptions = null,
2217CSharpParseOptions parseOptions = null,
2238CSharpParseOptions parseOptions = null,
2256CSharpParseOptions parseOptions = null,
2271protected static CSharpCompilation CreateCompilationWithSpan(CSharpTestSource tree, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2288protected static CSharpCompilation CreateCompilationWithMscorlibAndSpan(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2306protected static CSharpCompilation CreateCompilationWithMscorlibAndSpanSrc(string text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2320protected static CSharpCompilation CreateCompilationWithIndex(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2331protected static CSharpCompilation CreateCompilationWithIndexAndRange(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2342protected static CSharpCompilation CreateCompilationWithIndexAndRangeAndSpan(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null)
2353protected static CSharpCompilation CreateCompilationWithSpanAndMemoryExtensions(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null, TargetFramework targetFramework = TargetFramework.NetCoreApp)
2371protected static CSharpCompilation CreateCompilationWithIndexAndRangeAndSpanAndMemoryExtensions(CSharpTestSource text, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null, TargetFramework targetFramework = TargetFramework.NetCoreApp)
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (8)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.Rebuild (5)
Microsoft.CodeAnalysis.Rebuild.UnitTests (10)
Microsoft.CodeAnalysis.Test.Utilities (8)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
Microsoft.DotNet.GenFacades (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.ML.CodeAnalyzer.Tests (3)
Microsoft.VisualStudio.LanguageServices.CSharp (9)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (14)
Roslyn.VisualStudio.Next.UnitTests (1)
StackDepthTest (1)
System.Windows.Forms.Analyzers.CSharp.Tests (2)