1566 references to SourceCodeKind
GenerateDocumentationAndConfigFiles (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Metrics (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Metrics.Legacy (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis (17)
Compilation\Compilation.cs (1)
1077Debug.Assert(tree.Options.Kind != SourceCodeKind.Script);
Compilation\ParseOptions.cs (6)
26public SourceCodeKind Kind { get; protected set; } 30/// the call to the constructor, or modified using the <see cref="WithKind(SourceCodeKind)"/> method. 32public SourceCodeKind SpecifiedKind { get; protected set; } 39internal ParseOptions(SourceCodeKind kind, DocumentationMode documentationMode) 69public ParseOptions WithKind(SourceCodeKind kind) 97public abstract ParseOptions CommonWithKind(SourceCodeKind kind);
SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
Microsoft.CodeAnalysis.Analyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.AnalyzerUtilities (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.BannedApiAnalyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder_Initializers.cs (1)
195Debug.Assert(syntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\Binder_Patterns.cs (1)
907Debug.Assert(designation.SyntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
441if (node.Parent.Kind() == SyntaxKind.CompilationUnit && syntaxTree.Options.Kind != SourceCodeKind.Regular)
Binder\BinderFactory.cs (1)
94return _syntaxTree.Options.Kind == SourceCodeKind.Script;
CommandLine\CSharpCommandLineParser.cs (2)
1492kind: IsScriptCommandLineParser ? SourceCodeKind.Script : SourceCodeKind.Regular,
CommandLine\CSharpCompiler.cs (1)
49var scriptParseOptions = parseOptions.WithKind(SourceCodeKind.Script);
Compilation\CSharpCompilation.cs (1)
882if (this.IsSubmission && tree.Options.Kind == SourceCodeKind.Regular)
Compilation\SyntaxAndDeclarationManager.cs (4)
167var sourceCodeKind = tree.Options.Kind; 168if (sourceCodeKind == SourceCodeKind.Script) 681var sourceCodeKind = tree.Options.Kind; 682if (sourceCodeKind == SourceCodeKind.Script)
Compilation\SyntaxTreeSemanticModel.cs (2)
1299return this.SyntaxTree.Options.Kind == SourceCodeKind.Regular; 2363if (this.SyntaxTree.Options.Kind != SourceCodeKind.Regular)
CSharpParseOptions.cs (6)
53SourceCodeKind kind = SourceCodeKind.Regular, 66SourceCodeKind kind, 88public new CSharpParseOptions WithKind(SourceCodeKind kind) 95var effectiveKind = kind.MapSpecifiedToEffectiveKind(); 145public override ParseOptions CommonWithKind(SourceCodeKind kind)
Declarations\DeclarationTreeBuilder.cs (5)
131(node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular)); 141bool acceptSimpleProgram = node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular; 267Debug.Assert(_syntaxTree.Options.Kind != SourceCodeKind.Regular); 327Debug.Assert(parent.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind != SourceCodeKind.Regular); 393if (_syntaxTree.Options.Kind != SourceCodeKind.Regular)
Parser\DirectiveParser.cs (3)
502if (Options.Kind == SourceCodeKind.Regular) 522if (Options.Kind == SourceCodeKind.Regular) 688if (lexer.Options.Kind != SourceCodeKind.Script && !lexer.Options.FileBasedProgram)
Parser\SyntaxParser.cs (1)
226get { return Options.Kind == SourceCodeKind.Script; }
Syntax\CSharpSyntaxTree.cs (2)
136return Options.Kind == SourceCodeKind.Script && GetCompilationUnitRoot().HasReferenceDirectives; 146if (Options.Kind == SourceCodeKind.Script)
Syntax\SyntaxFactory.cs (2)
2330if (tree.Options.Kind != SourceCodeKind.Script) 2388if (tree.Options.Kind == SourceCodeKind.Regular ||
Syntax\SyntaxFacts.cs (1)
540return IsTopLevelStatement(syntax) && syntax.SyntaxTree.Options.Kind == SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
411=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (4)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
23private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
4993new TestParameters(new CSharpParseOptions(kind: SourceCodeKind.Regular)));
src\Features\CSharpTest\Diagnostics\AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor.cs (1)
22private static readonly CSharpParseOptions Script = new(kind: SourceCodeKind.Script);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
24new(languageVersion: LanguageVersion.Latest, kind: SourceCodeKind.Script);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (208)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (6)
56SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 71SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 82SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, 108SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 127SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 140SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph,
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (6)
43""", SourceCodeKind.Regular)).Single(); 86""", SourceCodeKind.Regular); 238""", SourceCodeKind.Regular); 266""", SourceCodeKind.Regular); 427""", SourceCodeKind.Regular); 486""", SourceCodeKind.Regular);
Completion\CompletionProviders\CrefCompletionProviderTests.cs (1)
29string expectedDescriptionOrNull, SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger,
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
1058var items = await GetCompletionItemsAsync(markup, SourceCodeKind.Regular);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
739return (_fixture.UpdateDocument(text, SourceCodeKind.Regular), position);
Completion\CompletionProviders\ExtensionMethodImportCompletionProviderTests.cs (10)
1997""", commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 2080sourceCodeKind: SourceCodeKind.Regular); 2108sourceCodeKind: SourceCodeKind.Regular); 2136sourceCodeKind: SourceCodeKind.Regular); 2168sourceCodeKind: SourceCodeKind.Regular); 2196sourceCodeKind: SourceCodeKind.Regular); 2224sourceCodeKind: SourceCodeKind.Regular); 2256sourceCodeKind: SourceCodeKind.Regular); 2292sourceCodeKind: SourceCodeKind.Regular); 2327sourceCodeKind: SourceCodeKind.Regular);
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (2)
97""", SourceCodeKind.Script); 113""", SourceCodeKind.Script);
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (3)
33SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 49await VerifyCommitCharactersAsync("#load \"$$", textTypedSoFar: "", validChars: commitCharacters, sourceCodeKind: SourceCodeKind.Script); 60=> VerifyTextualTriggerCharacter(markup, shouldTriggerWithTriggerOnLettersEnabled: true, shouldTriggerWithTriggerOnLettersDisabled: true, SourceCodeKind.Script);
Completion\CompletionProviders\OperatorCompletionProviderTests.cs (6)
86""", SourceCodeKind.Regular); 215""", SourceCodeKind.Regular); 262""", SourceCodeKind.Regular); 287""", SourceCodeKind.Regular); 341""", SourceCodeKind.Regular); 483""", SourceCodeKind.Regular);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (4)
823await BaseVerifyWorkerAsync(code, position, "@class()", "void Base.@class()", SourceCodeKind.Regular, false, deletedCharTrigger: null, false, null, null, null, null, null, null); 824await BaseVerifyWorkerAsync(code, position, "@class()", "void Base.@class()", SourceCodeKind.Script, false, deletedCharTrigger: null, false, null, null, null, null, null, null); 842await BaseVerifyWorkerAsync(code, position, "@class", "int Base.@class { get; set; }", SourceCodeKind.Regular, false, deletedCharTrigger: null, false, null, null, null, null, null, null); 843await BaseVerifyWorkerAsync(code, position, "@class", "int Base.@class { get; set; }", SourceCodeKind.Script, false, deletedCharTrigger: null, false, null, null, null, null, null, null);
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (6)
36SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 52await VerifyCommitCharactersAsync("#r \"$$", textTypedSoFar: "", validChars: commitCharacters, sourceCodeKind: SourceCodeKind.Script); 63=> VerifyTextualTriggerCharacter(markup, shouldTriggerWithTriggerOnLettersEnabled: true, shouldTriggerWithTriggerOnLettersDisabled: true, SourceCodeKind.Script); 74=> await VerifyItemExistsAsync("#r \"$$", "System.Windows.Forms", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 80"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 96await VerifyItemExistsAsync(code, windowsFolderName, expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (16)
37=> await VerifyItemExistsAsync(@"$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 41=> await VerifyItemExistsAsync(@"$$", MockSnippetInfoService.SnippetShortcut, MockSnippetInfoService.SnippetTitle + Environment.NewLine + MockSnippetInfoService.SnippetDescription + Environment.NewLine + string.Format(FeaturesResources.Note_colon_Tab_twice_to_insert_the_0_snippet, MockSnippetInfoService.SnippetShortcut), SourceCodeKind.Regular); 45=> await VerifyItemExistsAsync(@"namespace NS { $$ }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 49=> await VerifyItemExistsAsync(@"namespace NS { class C { $$ } }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 53=> await VerifyItemExistsAsync(@"namespace NS { class C { void M() { $$ } } }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 57=> await VerifyItemIsAbsentAsync(@"namespace NS { class C { void M() { int $$ } } }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 61=> await VerifyItemIsAbsentAsync(@"namespace NS { enum E { $$ } }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 65=> await VerifyItemExistsAsync(@"namespace NS { class C { void M() { bool b = true && $$ } } }", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 69=> await VerifyItemExistsAsync(@"#$$", MockSnippetInfoService.PreProcessorSnippetShortcut[1..], sourceCodeKind: SourceCodeKind.Regular); 73=> await VerifyItemIsAbsentAsync(@"#$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 77=> await VerifyItemIsAbsentAsync(@"#region $$", MockSnippetInfoService.PreProcessorSnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 81=> await VerifyItemExistsAsync(@"#r$$", MockSnippetInfoService.PreProcessorSnippetShortcut[1..], sourceCodeKind: SourceCodeKind.Regular); 85=> await VerifyItemIsAbsentAsync(@"#line (1, 2) - (3, 4) $$", MockSnippetInfoService.PreProcessorSnippetShortcut, sourceCodeKind: SourceCodeKind.Regular); 124await VerifyItemIsAbsentAsync(@"#r f$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script); 125await VerifyItemIsAbsentAsync(@"#load f$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script); 126await VerifyItemIsAbsentAsync(@"#!$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SpeculativeTCompletionProviderTests.cs (6)
617=> VerifyItemExistsAsync(@"$$", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 621=> VerifyItemIsAbsentAsync(@"void $$", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 625=> VerifyItemIsAbsentAsync(@"int $$", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 632""", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 639""", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 646""", "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (2)
1270var document1 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular); 1275var document2 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular, cleanBeforeUpdate: false);
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (69)
29[InlineData(SourceCodeKind.Regular)] 30[InlineData(SourceCodeKind.Script)] 31public async Task EmptyFile(SourceCodeKind sourceCodeKind) 38[InlineData(SourceCodeKind.Regular)] 39[InlineData(SourceCodeKind.Script)] 40public async Task EmptyFileWithUsing(SourceCodeKind sourceCodeKind) 54=> await VerifyItemIsAbsentAsync(@"#r $$", "@System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 58=> await VerifyItemIsAbsentAsync(@"#load $$", "@System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 324sourceCodeKind: SourceCodeKind.Script); 345sourceCodeKind: SourceCodeKind.Script); 452=> VerifyItemExistsAsync(@"namespace $$ { }", "System", sourceCodeKind: SourceCodeKind.Regular); 462""", "Runtime", sourceCodeKind: SourceCodeKind.Regular); 475sourceCodeKind: SourceCodeKind.Regular); 488sourceCodeKind: SourceCodeKind.Regular); 496""", "A", sourceCodeKind: SourceCodeKind.Regular); 505""", sourceCodeKind: SourceCodeKind.Regular); 521sourceCodeKind: SourceCodeKind.Regular); 525=> VerifyItemIsAbsentAsync(@"namespace N$$S", "NS", sourceCodeKind: SourceCodeKind.Regular); 542sourceCodeKind: SourceCodeKind.Regular); 561sourceCodeKind: SourceCodeKind.Regular); 570sourceCodeKind: SourceCodeKind.Regular); 605SourceCodeKind.Regular); 609=> VerifyNoItemsExistAsync(@"namespace A.$$", sourceCodeKind: SourceCodeKind.Regular); 617""", "B", sourceCodeKind: SourceCodeKind.Regular); 625""", "B", sourceCodeKind: SourceCodeKind.Regular); 642sourceCodeKind: SourceCodeKind.Regular); 656sourceCodeKind: SourceCodeKind.Regular); 672sourceCodeKind: SourceCodeKind.Regular); 681sourceCodeKind: SourceCodeKind.Regular); 685=> VerifyItemExistsAsync(@"name$$space System { }", "System", sourceCodeKind: SourceCodeKind.Regular); 699sourceCodeKind: SourceCodeKind.Regular); 735SourceCodeKind.Regular); 1966=> VerifyItemExistsAsync(prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1974=> VerifyItemIsAbsentAsync(prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Script); 1985""", "args", sourceCodeKind: SourceCodeKind.Regular); 1995""" + prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 2008""", "args", sourceCodeKind: SourceCodeKind.Regular); 2016=> VerifyItemExistsAsync("call(" + prefix + "$$)", "args", sourceCodeKind: SourceCodeKind.Regular); 2020=> await VerifyItemIsAbsentAsync(@"$$", "args", sourceCodeKind: SourceCodeKind.Regular); 2029""", "args", sourceCodeKind: SourceCodeKind.Regular); 2037""", "args", sourceCodeKind: SourceCodeKind.Regular); 2041=> await VerifyItemExistsAsync(@"string first = $$", "args", sourceCodeKind: SourceCodeKind.Regular); 2905await VerifyItemExistsAsync(markup, "Q", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 2906await VerifyItemIsAbsentAsync(markup, "R", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 2921await VerifyItemExistsAsync(markup, "Q", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 2922await VerifyItemIsAbsentAsync(markup, "R", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3013""", "String", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3021""", "ElementAt", displayTextSuffix: "<>", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3066""", "Console", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3413SourceCodeKind.Regular); 3427SourceCodeKind.Regular); 3937expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3947expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3957expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3967expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 7455""", "CommandLine", sourceCodeKind: SourceCodeKind.Script); 7747""", "ForSchemaSet", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 7818=> await VerifyItemIsAbsentAsync(@"base.$$", @"ToString", sourceCodeKind: SourceCodeKind.Script); 8788""", "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 8810""", "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 9739""", "aaa", sourceCodeKind: SourceCodeKind.Script); 9746""", "aaa", sourceCodeKind: SourceCodeKind.Script); 9794await VerifyNoItemsExistAsync("#!$$", sourceCodeKind: SourceCodeKind.Script); 9795await VerifyNoItemsExistAsync("#! S$$", sourceCodeKind: SourceCodeKind.Script, usePreviousCharAsTrigger: true); 10701""", "Length", sourceCodeKind: SourceCodeKind.Regular); 10717""", "Length", sourceCodeKind: SourceCodeKind.Script); 12190await VerifyItemIsAbsentAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 12522sourceCodeKind: SourceCodeKind.Regular); 13604sourceCodeKind: SourceCodeKind.Regular,
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (2)
32SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 39SourceCodeKind.Regular, usePreviousCharAsTrigger, deletedCharTrigger, checkForAbsence,
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (41)
842[InlineData(SourceCodeKind.Regular)] 843[InlineData(SourceCodeKind.Script)] 845public async Task Commit_NoImport_InProject(SourceCodeKind kind) 879[InlineData(SourceCodeKind.Regular)] 880[InlineData(SourceCodeKind.Script)] 882public async Task Commit_TopLevelStatement_NoImport_InProject(SourceCodeKind kind) 904[InlineData(SourceCodeKind.Regular)] 905[InlineData(SourceCodeKind.Script)] 907public async Task Commit_TopLevelStatement_UnrelatedImport_InProject(SourceCodeKind kind) 932[InlineData(SourceCodeKind.Regular)] 933[InlineData(SourceCodeKind.Script)] 935public async Task Commit_NoImport_InVBReference(SourceCodeKind kind) 966[InlineData(SourceCodeKind.Regular)] 967[InlineData(SourceCodeKind.Script)] 969public Task Commit_NoImport_InPEReference(SourceCodeKind kind) 1112[InlineData(SourceCodeKind.Regular)] 1113[InlineData(SourceCodeKind.Script)] 1116public async Task CommitAttributeTypeInAttributeNameContext(SourceCodeKind kind) 1173[InlineData(SourceCodeKind.Regular)] 1174[InlineData(SourceCodeKind.Script)] 1177public async Task CommitAttributeTypeInNonAttributeNameContext(SourceCodeKind kind) 1235[InlineData(SourceCodeKind.Regular)] 1236[InlineData(SourceCodeKind.Script)] 1239public async Task CommitAttributeTypeWithoutSuffixInAttributeNameContext(SourceCodeKind kind) 1296[InlineData(SourceCodeKind.Regular)] 1297[InlineData(SourceCodeKind.Script)] 1300public async Task CommitAttributeTypeWithoutSuffixInNonAttributeNameContext(SourceCodeKind kind) 1363[InlineData(SourceCodeKind.Regular)] 1364[InlineData(SourceCodeKind.Script)] 1367public async Task CommitTypeInUsingStaticContextShouldUseFullyQualifiedName(SourceCodeKind kind) 1385[InlineData(SourceCodeKind.Regular)] 1386[InlineData(SourceCodeKind.Script)] 1389public async Task CommitGenericTypeParameterInUsingAliasContextShouldUseFullyQualifiedName(SourceCodeKind kind) 1407[InlineData(SourceCodeKind.Regular)] 1408[InlineData(SourceCodeKind.Script)] 1411public async Task CommitGenericTypeParameterInUsingAliasContextShouldUseFullyQualifiedName2(SourceCodeKind kind) 1671""", commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1713""", commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1715[InlineData(SourceCodeKind.Regular)] 1716[InlineData(SourceCodeKind.Script)] 1719public Task CommitInLocalFunctionContext(SourceCodeKind kind)
Completion\CompletionProviders\XmlDocumentationCommentCompletionProviderTests.cs (5)
44SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 448""", "args", sourceCodeKind: SourceCodeKind.Regular); 460""", "args", sourceCodeKind: SourceCodeKind.Script); 469""", "str", sourceCodeKind: SourceCodeKind.Regular); 478""", "str", sourceCodeKind: SourceCodeKind.Script);
Debugging\LocationInfoGetterTests.cs (3)
464""", "f1", 0, new CSharpParseOptions(kind: SourceCodeKind.Script)); 473""", "M1(int x)", 2, new CSharpParseOptions(kind: SourceCodeKind.Script)); 480""", null, 0, new CSharpParseOptions(kind: SourceCodeKind.Script));
ExtractMethod\ExtractMethodTests.cs (1)
9218""", parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Script));
ExtractMethod\ExtractMethodTests.LanguageInteraction.cs (1)
1212""", parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Script));
Formatting\RazorLineFormattingOptionsTests.cs (1)
62sourceCodeKind: SourceCodeKind.Regular,
GoToAdjacentMember\CSharpGoToAdjacentMemberTests.cs (2)
418""", next: true, sourceCodeKind: SourceCodeKind.Script); 426""", next: false, sourceCodeKind: SourceCodeKind.Script);
SignatureHelp\GenericNamePartiallyWrittenSignatureHelpProviderTests.cs (2)
135""", expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular); 325""", expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\GenericNameSignatureHelpProviderTests.cs (1)
597""", expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular);
SignatureHelp\InitializerExpressionSignatureHelpProviderTests.cs (1)
163new($"({CSharpFeaturesResources.extension}) void Bar.Add(int i, string s, bool b)", currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.cs (4)
299""", [new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) int string.ExtensionMethod(int x)", string.Empty, string.Empty, currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular); 1473new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) void IGoo.Bar<T1, T2>()", currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular); 2339sourceCodeKind: SourceCodeKind.Regular); 2374sourceCodeKind: SourceCodeKind.Regular);
TypeInferrer\TypeInferrerTests.cs (2)
1178@"yield return [|abc|]", "global::System.Object", mode, sourceCodeKind: SourceCodeKind.Script); 1336@"return [|Goo()|];", "global::System.Object", mode, sourceCodeKind: SourceCodeKind.Script);
TypeInferrer\TypeInferrerTests.Delegate.cs (1)
26var document = workspaceFixture.Target.UpdateDocument(text, SourceCodeKind.Regular);
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
213var document1 = new EditorTestHostDocument("var x = 1;", displayName: "Sub1", sourceCodeKind: SourceCodeKind.Script); 216var document2 = new EditorTestHostDocument("var x = 2;", displayName: "Sub2", sourceCodeKind: SourceCodeKind.Script, filePath: "a.csx");
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (731)
Recommendations\AbstractKeywordRecommenderTests.cs (9)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Script, 184=> VerifyAbsenceAsync(SourceCodeKind.Regular, 192=> VerifyAbsenceAsync(SourceCodeKind.Script, 266=> VerifyKeywordAsync(SourceCodeKind.Regular, 271=> VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\AddKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AliasKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AnnotationsKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AscendingKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AsKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AssemblyKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AsyncKeywordRecommenderTests.cs (2)
62=> VerifyKeywordAsync(SourceCodeKind.Script, @"$$"); 66=> VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
Recommendations\BaseKeywordRecommenderTests.cs (4)
18=> VerifyAbsenceAsync(SourceCodeKind.Script, 23=> VerifyAbsenceAsync(SourceCodeKind.Script, 33=> VerifyAbsenceAsync(SourceCodeKind.Script, 107SourceCodeKind.Regular,
Recommendations\BoolKeywordRecommenderTests.cs (1)
22=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\BreakKeywordRecommenderTests.cs (1)
21=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ByKeywordRecommenderTests.cs (1)
21=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ByteKeywordRecommenderTests.cs (1)
22=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\CaseKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\CatchKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\CharKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\CheckedKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ChecksumKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ClassKeywordRecommenderTests.cs (11)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Script, 184=> VerifyAbsenceAsync(SourceCodeKind.Regular, 192=> VerifyAbsenceAsync(SourceCodeKind.Script, 282=> VerifyKeywordAsync(SourceCodeKind.Regular, 321=> VerifyAbsenceAsync(SourceCodeKind.Regular, 330=> VerifyAbsenceAsync(SourceCodeKind.Regular, 339=> VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ConstKeywordRecommenderTests.cs (14)
121[InlineData(SourceCodeKind.Regular)] 122[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")] 123public Task TestNotBeforeUsing(SourceCodeKind sourceCodeKind) 131[InlineData(SourceCodeKind.Regular)] 132[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")] 133public Task TestNotBeforeGlobalUsing(SourceCodeKind sourceCodeKind) 149=> VerifyKeywordAsync(SourceCodeKind.Regular, """ 156=> VerifyKeywordAsync(SourceCodeKind.Script, """ 210=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 214=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 226=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 230=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 242=> VerifyAbsenceAsync(SourceCodeKind.Regular, 247=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ContinueKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DecimalKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DefaultKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DefineKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DelegateKeywordRecommenderTests.cs (13)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 172=> VerifyAbsenceAsync(SourceCodeKind.Regular, 180=> VerifyAbsenceAsync(SourceCodeKind.Script, 188=> VerifyAbsenceAsync(SourceCodeKind.Regular, 196=> VerifyAbsenceAsync(SourceCodeKind.Script, 285await VerifyKeywordAsync(SourceCodeKind.Regular, @"static $$"); 286await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 293await VerifyKeywordAsync(SourceCodeKind.Regular, AddInsideMethod(@$"{keyword} $$")); 294await VerifyKeywordAsync(SourceCodeKind.Script, AddInsideMethod(@$"{keyword} $$")); 300await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 301await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\DescendingKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DisableKeywordRecommenderTests.cs (4)
29=> VerifyAbsenceAsync(SourceCodeKind.Script, 34=> VerifyAbsenceAsync(SourceCodeKind.Script, 42=> VerifyAbsenceAsync(SourceCodeKind.Script, 50=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DoKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DoubleKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DynamicKeywordRecommenderTests.cs (3)
28=> VerifyKeywordAsync(SourceCodeKind.Script, 33=> VerifyKeywordAsync(SourceCodeKind.Script, 49=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ElifKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ElseKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EnableKeywordRecommenderTests.cs (4)
33=> await VerifyAbsenceAsync(SourceCodeKind.Script, @"$$"); 37=> VerifyAbsenceAsync(SourceCodeKind.Script, 45=> VerifyAbsenceAsync(SourceCodeKind.Script, 53=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EndIfKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EndRegionKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EnumKeywordRecommenderTests.cs (7)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script, 140=> VerifyAbsenceAsync(SourceCodeKind.Regular, 148=> VerifyAbsenceAsync(SourceCodeKind.Script, 156=> VerifyAbsenceAsync(SourceCodeKind.Regular, 164=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EqualsKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ErrorKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EventKeywordRecommenderTests.cs (32)
18=> VerifyKeywordAsync(SourceCodeKind.Script, 23=> VerifyKeywordAsync(SourceCodeKind.Script, 31=> VerifyKeywordAsync(SourceCodeKind.Script, 39=> VerifyKeywordAsync(SourceCodeKind.Script, 62=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 66=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 73=> VerifyKeywordAsync(SourceCodeKind.Script, """ 80=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 87=> VerifyKeywordAsync(SourceCodeKind.Script, """ 94=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 101=> VerifyKeywordAsync(SourceCodeKind.Script, """ 108=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 115=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 122=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 156=> VerifyAbsenceAsync(SourceCodeKind.Regular, 164=> VerifyAbsenceAsync(SourceCodeKind.Script, 172=> VerifyAbsenceAsync(SourceCodeKind.Regular, 180=> VerifyAbsenceAsync(SourceCodeKind.Script, 188=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 195=> VerifyKeywordAsync(SourceCodeKind.Script, """ 202=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 209=> VerifyKeywordAsync(SourceCodeKind.Script, """ 274=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 278=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 290=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 294=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 306=> VerifyAbsenceAsync(SourceCodeKind.Regular, 311=> VerifyKeywordAsync(SourceCodeKind.Script, 357=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 361=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 373=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 377=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\ExplicitKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FalseKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\FieldKeywordRecommenderTests.cs (4)
18=> VerifyAbsenceAsync(SourceCodeKind.Script, 23=> VerifyAbsenceAsync(SourceCodeKind.Script, 31=> VerifyAbsenceAsync(SourceCodeKind.Script, 39=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FinallyKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FixedKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FloatKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ForEachKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 26=> VerifyKeywordAsync(SourceCodeKind.Script, 50=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ForKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\FromKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\GetKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\GlobalKeywordRecommenderTests.cs (2)
228=> VerifyAbsenceAsync(SourceCodeKind.Regular, 236=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\GotoKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\GroupKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\HiddenKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IfKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ImplicitKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InitKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InKeywordRecommenderTests.cs (5)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script, 346=> VerifyAbsenceAsync(SourceCodeKind.Script, """
Recommendations\InterfaceKeywordRecommenderTests.cs (7)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script, 148=> VerifyAbsenceAsync(SourceCodeKind.Regular, 156=> VerifyAbsenceAsync(SourceCodeKind.Script, 164=> VerifyAbsenceAsync(SourceCodeKind.Regular, 172=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InternalKeywordRecommenderTests.cs (7)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script, 148=> VerifyAbsenceAsync(SourceCodeKind.Regular, 156=> VerifyAbsenceAsync(SourceCodeKind.Script, 164=> VerifyAbsenceAsync(SourceCodeKind.Regular, 172=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IntKeywordRecommenderTests.cs (6)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 46=> VerifyKeywordAsync(SourceCodeKind.Script, 51=> VerifyKeywordAsync(SourceCodeKind.Script, 618=> VerifyKeywordAsync(SourceCodeKind.Script, """
Recommendations\IntoKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IsKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\JoinKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LetKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LineKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LockKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\LongKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\MethodKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ModuleKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NameOfKeywordRecommenderTests.cs (3)
21=> VerifyKeywordAsync(SourceCodeKind.Script, 26=> VerifyKeywordAsync(SourceCodeKind.Script, 42=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\NamespaceKeywordRecommenderTests.cs (36)
26=> VerifyAbsenceAsync(SourceCodeKind.Script, 34=> VerifyAbsenceAsync(SourceCodeKind.Script, 42=> VerifyAbsenceAsync(SourceCodeKind.Script, 55=> VerifyKeywordAsync(SourceCodeKind.Regular, 60=> VerifyAbsenceAsync(SourceCodeKind.Script, 69=> VerifyKeywordAsync(SourceCodeKind.Regular, 77=> VerifyAbsenceAsync(SourceCodeKind.Regular, 85=> VerifyAbsenceAsync(SourceCodeKind.Regular, 94=> VerifyKeywordAsync(SourceCodeKind.Regular, 105=> VerifyAbsenceAsync(SourceCodeKind.Script, 113=> VerifyKeywordAsync(SourceCodeKind.Regular, 121=> VerifyAbsenceAsync(SourceCodeKind.Script, 129=> VerifyAbsenceAsync(SourceCodeKind.Regular, 138=> VerifyKeywordAsync(SourceCodeKind.Regular, 149=> VerifyKeywordAsync(SourceCodeKind.Regular, 157=> VerifyKeywordAsync(SourceCodeKind.Regular, 165=> VerifyAbsenceAsync(SourceCodeKind.Script, 173=> VerifyAbsenceAsync(SourceCodeKind.Script, 181=> VerifyKeywordAsync(SourceCodeKind.Regular, 189=> VerifyAbsenceAsync(SourceCodeKind.Script, 197=> VerifyKeywordAsync(SourceCodeKind.Regular, 205=> VerifyAbsenceAsync(SourceCodeKind.Script, 213=> VerifyKeywordAsync(SourceCodeKind.Regular, 221=> VerifyAbsenceAsync(SourceCodeKind.Script, 229=> VerifyKeywordAsync(SourceCodeKind.Regular, 237=> VerifyAbsenceAsync(SourceCodeKind.Script, 262=> VerifyKeywordAsync(SourceCodeKind.Regular, 270=> VerifyAbsenceAsync(SourceCodeKind.Script, 285=> VerifyKeywordAsync(SourceCodeKind.Regular, 294=> VerifyAbsenceAsync(SourceCodeKind.Script, 311=> VerifyKeywordAsync(SourceCodeKind.Regular, 320=> VerifyAbsenceAsync(SourceCodeKind.Script, 386=> VerifyKeywordAsync(SourceCodeKind.Regular, 394=> VerifyAbsenceAsync(SourceCodeKind.Script, 419=> VerifyKeywordAsync(SourceCodeKind.Regular, 432=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NewKeywordRecommenderTests.cs (18)
548=> VerifyAbsenceAsync(SourceCodeKind.Regular, 556=> VerifyAbsenceAsync(SourceCodeKind.Script, 564=> VerifyAbsenceAsync(SourceCodeKind.Regular, 572=> VerifyAbsenceAsync(SourceCodeKind.Script, 587=> VerifyKeywordAsync(SourceCodeKind.Regular, """ 594=> VerifyKeywordAsync(SourceCodeKind.Script, """ 642=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 646=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 650=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 654=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 658=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static internal $$"); 662=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static internal $$"); 666=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal static $$"); 670=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal static $$"); 682=> VerifyAbsenceAsync(SourceCodeKind.Regular, 687=> VerifyKeywordAsync(SourceCodeKind.Script, 696=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 700=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\NotnullKeywordRecommenderTests.cs (1)
27=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NullableKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NullKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ObjectKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\OnKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OperatorKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OrderByKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OutKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OverrideKeywordRecommenderTests.cs (9)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script, 61=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 143=> VerifyAbsenceAsync(SourceCodeKind.Regular, 151=> VerifyAbsenceAsync(SourceCodeKind.Script, 159=> VerifyAbsenceAsync(SourceCodeKind.Regular, 167=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ParamKeywordRecommenderTests.cs (4)
25=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script, 46=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ParamsKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PartialKeywordRecommenderTests.cs (10)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 158=> VerifyAbsenceAsync(SourceCodeKind.Regular, 166=> VerifyAbsenceAsync(SourceCodeKind.Script, 174=> VerifyAbsenceAsync(SourceCodeKind.Regular, 182=> VerifyAbsenceAsync(SourceCodeKind.Script, 318=> VerifyAbsenceAsync(SourceCodeKind.Regular, 327=> VerifyAbsenceAsync(SourceCodeKind.Regular, 336=> VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PragmaKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PrivateKeywordRecommenderTests.cs (25)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 29=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script, 60=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 64=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 71=> VerifyKeywordAsync(SourceCodeKind.Script, """ 78=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 85=> VerifyKeywordAsync(SourceCodeKind.Script, """ 92=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 99=> VerifyKeywordAsync(SourceCodeKind.Script, """ 106=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 113=> VerifyAbsenceAsync(SourceCodeKind.Regular, 121=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 128=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 162=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 169=> VerifyAbsenceAsync(SourceCodeKind.Script, """ 176=> VerifyAbsenceAsync(SourceCodeKind.Regular, 184=> VerifyAbsenceAsync(SourceCodeKind.Script, 192=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 199=> VerifyKeywordAsync(SourceCodeKind.Script, """ 206=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 213=> VerifyKeywordAsync(SourceCodeKind.Script, """ 314=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 318=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PropertyKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ProtectedKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PublicKeywordRecommenderTests.cs (10)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 149=> VerifyAbsenceAsync(SourceCodeKind.Regular, 157=> VerifyAbsenceAsync(SourceCodeKind.Script, 165=> VerifyAbsenceAsync(SourceCodeKind.Regular, 173=> VerifyAbsenceAsync(SourceCodeKind.Script, 296=> VerifyAbsenceAsync(SourceCodeKind.Regular, 305=> VerifyAbsenceAsync(SourceCodeKind.Regular, 314=> VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReadOnlyKeywordRecommenderTests.cs (6)
157=> VerifyAbsenceAsync(SourceCodeKind.Regular, 165=> VerifyAbsenceAsync(SourceCodeKind.Script, 173=> VerifyAbsenceAsync(SourceCodeKind.Regular, 181=> VerifyAbsenceAsync(SourceCodeKind.Script, 266=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$"); 566@"ref int x = ref $$", topLevelStatement: true), options: CSharp9ParseOptions.WithKind(SourceCodeKind.Script));
Recommendations\RecommenderTests.cs (6)
176SourceCodeKind kind, 181case SourceCodeKind.Regular: 185case SourceCodeKind.Script: 202SourceCodeKind kind, 207case SourceCodeKind.Regular: 210case SourceCodeKind.Script:
Recommendations\RecordKeywordRecommenderTests.cs (11)
18=> VerifyKeywordAsync(SourceCodeKind.Script, 23=> VerifyKeywordAsync(SourceCodeKind.Script, 39=> VerifyKeywordAsync(SourceCodeKind.Script, 169=> VerifyAbsenceAsync(SourceCodeKind.Regular, 177=> VerifyAbsenceAsync(SourceCodeKind.Script, 185=> VerifyAbsenceAsync(SourceCodeKind.Regular, 193=> VerifyAbsenceAsync(SourceCodeKind.Script, 289=> VerifyKeywordAsync(SourceCodeKind.Regular, 352=> VerifyAbsenceAsync(SourceCodeKind.Regular, 361=> VerifyAbsenceAsync(SourceCodeKind.Regular, 370=> VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReferenceKeywordRecommenderTests.cs (9)
60=> VerifyAbsenceAsync(SourceCodeKind.Regular, 65=> VerifyKeywordAsync(SourceCodeKind.Script, 70=> VerifyAbsenceAsync(SourceCodeKind.Regular, 75=> VerifyKeywordAsync(SourceCodeKind.Script, 80=> VerifyKeywordAsync(SourceCodeKind.Script, 89=> VerifyKeywordAsync(SourceCodeKind.Script, 97=> VerifyKeywordAsync(SourceCodeKind.Script, 105=> VerifyAbsenceAsync(SourceCodeKind.Script, 113=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RefKeywordRecommenderTests.cs (13)
473=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$"); 671[InlineData(SourceCodeKind.Regular, true)] 672[InlineData(SourceCodeKind.Regular, false)] 673[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")] 674[InlineData(SourceCodeKind.Script, false)] 675public Task TestInConditionalExpressionTrueBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement) 681options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions); 684[InlineData(SourceCodeKind.Regular, true)] 685[InlineData(SourceCodeKind.Regular, false)] 686[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")] 687[InlineData(SourceCodeKind.Script, false)] 688public Task TestInConditionalExpressionFalseBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement) 695options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
Recommendations\RegionKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RemoveKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RestoreKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ReturnKeywordRecommenderTests.cs (10)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Regular, 27=> VerifyAbsenceAsync(SourceCodeKind.Script, 35=> VerifyKeywordAsync(SourceCodeKind.Regular, 43=> VerifyAbsenceAsync(SourceCodeKind.Script, 51=> VerifyKeywordAsync(SourceCodeKind.Regular, 59=> VerifyAbsenceAsync(SourceCodeKind.Script, 67=> VerifyKeywordAsync(SourceCodeKind.Regular, 228=> VerifyAbsenceAsync(SourceCodeKind.Regular, 233=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SByteKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ScopedKeywordRecommenderTests.cs (3)
25=> VerifyKeywordAsync(SourceCodeKind.Script, 30=> VerifyKeywordAsync(SourceCodeKind.Script, 46=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SealedKeywordRecommenderTests.cs (8)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Script, 184=> VerifyAbsenceAsync(SourceCodeKind.Regular, 192=> VerifyAbsenceAsync(SourceCodeKind.Script, 266=> VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\SelectKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\SetKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ShortKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SizeOfKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StackAllocKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StaticKeywordRecommenderTests.cs (8)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Script, 184=> VerifyAbsenceAsync(SourceCodeKind.Regular, 192=> VerifyAbsenceAsync(SourceCodeKind.Script, 267=> VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\StringKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StructKeywordRecommenderTests.cs (17)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Regular, 184=> VerifyKeywordAsync(SourceCodeKind.Regular, 189=> VerifyKeywordAsync(SourceCodeKind.Regular, 194=> VerifyKeywordAsync(SourceCodeKind.Regular, 199=> VerifyKeywordAsync(SourceCodeKind.Regular, 204=> VerifyKeywordAsync(SourceCodeKind.Regular, 209=> VerifyKeywordAsync(SourceCodeKind.Regular, 214=> VerifyAbsenceAsync(SourceCodeKind.Regular, 219=> VerifyAbsenceAsync(SourceCodeKind.Regular, 224=> VerifyAbsenceAsync(SourceCodeKind.Script, 232=> VerifyAbsenceAsync(SourceCodeKind.Script, 307=> VerifyKeywordAsync(SourceCodeKind.Regular, 322=> VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\SwitchKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ThisKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ThrowKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TrueKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TryKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TypeKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\TypeOfKeywordRecommenderTests.cs (3)
21=> VerifyKeywordAsync(SourceCodeKind.Script, 26=> VerifyKeywordAsync(SourceCodeKind.Script, 42=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TypeVarKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UIntKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ULongKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UncheckedKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UndefKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UnmanagedKeywordRecommenderTests.cs (1)
16=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UnsafeKeywordRecommenderTests.cs (8)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script, 168=> VerifyAbsenceAsync(SourceCodeKind.Regular, 176=> VerifyAbsenceAsync(SourceCodeKind.Script, 184=> VerifyAbsenceAsync(SourceCodeKind.Regular, 192=> VerifyAbsenceAsync(SourceCodeKind.Script, 281=> VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\UShortKeywordRecommenderTests.cs (3)
17=> VerifyKeywordAsync(SourceCodeKind.Script, 22=> VerifyKeywordAsync(SourceCodeKind.Script, 38=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UsingKeywordRecommenderTests.cs (5)
42=> VerifyKeywordAsync(SourceCodeKind.Script, 238=> VerifyAbsenceAsync(SourceCodeKind.Regular, 246=> VerifyAbsenceAsync(SourceCodeKind.Script, 254=> VerifyAbsenceAsync(SourceCodeKind.Regular, 262=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\VarKeywordRecommenderTests.cs (3)
28=> VerifyKeywordAsync(SourceCodeKind.Script, 33=> VerifyKeywordAsync(SourceCodeKind.Script, 49=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\VirtualKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\VoidKeywordRecommenderTests.cs (13)
38=> VerifyKeywordAsync(SourceCodeKind.Script, 151=> VerifyAbsenceAsync(SourceCodeKind.Regular, 159=> VerifyAbsenceAsync(SourceCodeKind.Script, 167=> VerifyAbsenceAsync(SourceCodeKind.Regular, 175=> VerifyAbsenceAsync(SourceCodeKind.Script, 261=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 265=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 277=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 281=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 293=> VerifyAbsenceAsync(SourceCodeKind.Regular, 298=> VerifyKeywordAsync(SourceCodeKind.Script, 348=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 352=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\VolatileKeywordRecommenderTests.cs (32)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 29=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script, 60=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 64=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 71=> VerifyKeywordAsync(SourceCodeKind.Script, """ 78=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 85=> VerifyKeywordAsync(SourceCodeKind.Script, """ 92=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 99=> VerifyKeywordAsync(SourceCodeKind.Script, """ 106=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 113=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 120=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 154=> VerifyAbsenceAsync(SourceCodeKind.Regular, 162=> VerifyAbsenceAsync(SourceCodeKind.Script, 170=> VerifyAbsenceAsync(SourceCodeKind.Regular, 178=> VerifyAbsenceAsync(SourceCodeKind.Script, 186=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 193=> VerifyKeywordAsync(SourceCodeKind.Script, """ 200=> VerifyAbsenceAsync(SourceCodeKind.Regular, """ 207=> VerifyKeywordAsync(SourceCodeKind.Script, """ 261=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 265=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 277=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 281=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 293=> VerifyAbsenceAsync(SourceCodeKind.Regular, 298=> VerifyKeywordAsync(SourceCodeKind.Script, 336=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 340=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 352=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 356=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\WarningKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WarningsKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WhereKeywordRecommenderTests.cs (4)
17=> VerifyAbsenceAsync(SourceCodeKind.Script, 22=> VerifyAbsenceAsync(SourceCodeKind.Script, 30=> VerifyAbsenceAsync(SourceCodeKind.Script, 38=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WhileKeywordRecommenderTests.cs (3)
16=> VerifyKeywordAsync(SourceCodeKind.Script, 21=> VerifyKeywordAsync(SourceCodeKind.Script, 37=> VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\WithKeywordRecommenderTests.cs (4)
22=> VerifyAbsenceAsync(SourceCodeKind.Script, 27=> VerifyAbsenceAsync(SourceCodeKind.Script, 35=> VerifyAbsenceAsync(SourceCodeKind.Script, 43=> VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\YieldKeywordRecommenderTests.cs (4)
16=> VerifyAbsenceAsync(SourceCodeKind.Script, 21=> VerifyAbsenceAsync(SourceCodeKind.Script, 29=> VerifyAbsenceAsync(SourceCodeKind.Script, 37=> VerifyAbsenceAsync(SourceCodeKind.Script,
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
354kind: SourceCodeKind.Regular);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Attributes\AttributeTests_Dynamic.cs (15)
1293[InlineData(SourceCodeKind.Regular)] 1294[InlineData(SourceCodeKind.Script)] 1295public void TestNoCS1980WhenNotInContextWhichNeedsDynamicAttribute(SourceCodeKind sourceCodeKind) 1303[InlineData(SourceCodeKind.Regular)] 1304[InlineData(SourceCodeKind.Script)] 1305public void TestNoCS1980WhenNotInContextWhichNeedsDynamicAttribute_Errors(SourceCodeKind sourceCodeKind) 1341[InlineData(SourceCodeKind.Regular)] 1342[InlineData(SourceCodeKind.Script)] 1343public void TestDynamicAttributeInAliasContext1(SourceCodeKind sourceCodeKind) 1355[InlineData(SourceCodeKind.Regular)] 1356[InlineData(SourceCodeKind.Script)] 1357public void TestDynamicAttributeInAliasContext2(SourceCodeKind sourceCodeKind) 1369[InlineData(SourceCodeKind.Regular)] 1370[InlineData(SourceCodeKind.Script)] 1371public void TestDynamicAttributeInAliasContext_Errors(SourceCodeKind sourceCodeKind)
Diagnostics\GetDiagnosticsTests.cs (1)
522var compilation = CreateCompilationWithMscorlib461(string.Empty, parseOptions: new CSharpParseOptions().WithKind(SourceCodeKind.Interactive));
Microsoft.CodeAnalysis.CSharp.Features (3)
ExtractMethod\CSharpSelectionValidator.cs (2)
108if (!localFunction && options is { Kind: SourceCodeKind.Regular }) 112if (localFunction && options is { Kind: SourceCodeKind.Script })
GenerateType\CSharpGenerateTypeService.cs (1)
234document.Document.SourceCodeKind == SourceCodeKind.Regular)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Diagnostics\AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor.cs (1)
22private static readonly CSharpParseOptions Script = new(kind: SourceCodeKind.Script);
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
23private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
4993new TestParameters(new CSharpParseOptions(kind: SourceCodeKind.Regular)));
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
18internal static readonly CSharpParseOptions DefaultParseOptions = new CSharpParseOptions(kind: SourceCodeKind.Script, languageVersion: LanguageVersion.Latest);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ScriptOptionsTests.cs (1)
34var options = ScriptOptions.Default.WithParseOptions(new VisualBasicParseOptions(kind: SourceCodeKind.Script, languageVersion: VisualBasic.LanguageVersion.Latest));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\DelegateTypeTests.cs (2)
10323var comp = CreateCompilation(source, parseOptions: TestOptions.Regular9.WithKind(SourceCodeKind.Script)); 10335comp = CreateCompilation(source, parseOptions: TestOptions.Regular10.WithKind(SourceCodeKind.Script));
Semantics\InterpolationTests.cs (2)
1157kind: SourceCodeKind.Regular 1368kind: SourceCodeKind.Regular
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.Syntax.UnitTests (54)
LexicalAndXml\PreprocessorTests.cs (13)
75private CSharpParseOptions GetOptions(SourceCodeKind kind, string[] defines) 82return Parse(text, SourceCodeKind.Regular, defines); 85private CompilationUnitSyntax Parse(string text, SourceCodeKind kind, params string[] defines) 99var options = this.GetOptions(SourceCodeKind.Regular, defines); 3255var node = Parse(text, SourceCodeKind.Regular); 3278var node = Parse(text, SourceCodeKind.Regular); 4300var node = Parse(text, SourceCodeKind.Script); 4315var node = Parse(text, SourceCodeKind.Script); 4388var node = Parse(text, SourceCodeKind.Script); 4403var node = Parse(text, SourceCodeKind.Script); 4417var node = Parse(text, SourceCodeKind.Script); 4432var node = Parse(text, SourceCodeKind.Script); 4447var node = Parse(text, SourceCodeKind.Script);
Parsing\CSharpParseOptionsTests.cs (25)
44TestProperty((old, value) => old.WithKind(value), opt => opt.Kind, SourceCodeKind.Script); 92Assert.Equal(SourceCodeKind.Regular, options.Kind); 93Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 97options = new CSharpParseOptions(kind: SourceCodeKind.Regular); 98Assert.Equal(SourceCodeKind.Regular, options.Kind); 99Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 103options = new CSharpParseOptions(kind: SourceCodeKind.Script); 104Assert.Equal(SourceCodeKind.Script, options.Kind); 105Assert.Equal(SourceCodeKind.Script, options.SpecifiedKind); 110options = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 111Assert.Equal(SourceCodeKind.Script, options.Kind); 112Assert.Equal(SourceCodeKind.Interactive, options.SpecifiedKind); 119options = new CSharpParseOptions(kind: (SourceCodeKind)int.MinValue); 120Assert.Equal(SourceCodeKind.Regular, options.Kind); 121Assert.Equal((SourceCodeKind)int.MinValue, options.SpecifiedKind); 131var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 132var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script); 138options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 139options2 = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 148var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 149var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script); 155options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 156options2 = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 166var options = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 208var options = new CSharpParseOptions().WithKind(SourceCodeKind.Interactive);
Parsing\MemberDeclarationParsingTests.cs (1)
2228bool isScript = parseOptions.Kind == SourceCodeKind.Script;
Syntax\SyntaxRewriterTests.cs (15)
368Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 377Assert.Equal(SourceCodeKind.Script, tree.Options.Kind); 387Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 396Assert.Equal(SourceCodeKind.Script, tree.Options.Kind); 407Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 414Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind); 423Assert.Equal(SourceCodeKind.Script, tree.Options.Kind); 434Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 451Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 457Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind); 478Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 484Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind); 506Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 519Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind); 532Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
TestOptions.cs (3)
19public static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.Parse); 20public static readonly CSharpParseOptions Script = Regular.WithKind(SourceCodeKind.Script); 58new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None, languageVersion: LanguageVersion.Preview).WithFeatures(s_experimentalFeatures);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
FindSymbols\FindSymbolsUtilities.cs (1)
46if (((CSharpParseOptions)container.SyntaxTree.Options).Kind == SourceCodeKind.Script)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
411=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (76)
Completion\AbstractArgumentProviderTests`1.cs (1)
59var document = workspaceFixture.Target.UpdateDocument(code, SourceCodeKind.Regular);
Completion\AbstractCompletionProviderTests.cs (49)
114=> document.SourceCodeKind == SourceCodeKind.Regular ? [] : [PredefinedInteractiveTextViewRoles.InteractiveTextViewRole]; 122SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 130SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 283SourceCodeKind? SourceCodeKind = null) 314SourceCodeKind? sourceCodeKind, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool checkForAbsence, 319SourceCodeKind[] evaluatedSourceCodeKinds = sourceCodeKind.HasValue ? [sourceCodeKind.Value] : [SourceCodeKind.Regular, SourceCodeKind.Script]; 320foreach (var sourceKind in evaluatedSourceCodeKinds) 341string markup, SourceCodeKind? sourceCodeKind, char? deletedCharTrigger, bool usePreviousCharAsTrigger, 345SourceCodeKind[] evaluatedSourceCodeKinds = sourceCodeKind.HasValue ? [sourceCodeKind.Value] : [SourceCodeKind.Regular, SourceCodeKind.Script]; 346foreach (var sourceKind in evaluatedSourceCodeKinds) 378protected async Task VerifyCustomCommitProviderAsync(string markupBeforeCommit, string itemToCommit, string expectedCodeAfterCommit, SourceCodeKind? sourceCodeKind = null, char? commitChar = null) 392await VerifyCustomCommitProviderWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, SourceCodeKind.Regular, commitChar); 393await VerifyCustomCommitProviderWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, SourceCodeKind.Script, commitChar); 403SourceCodeKind? sourceCodeKind = null) 419await VerifyProviderCommitWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, commitChar, SourceCodeKind.Regular); 420await VerifyProviderCommitWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, commitChar, SourceCodeKind.Script); 432SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, char? deletedCharTrigger = null, 447SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, char? deletedCharTrigger = null, 459string markup, SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, 466string markup, SourceCodeKind? sourceCodeKind = null, 475SourceCodeKind? sourceCodeKind = null, 497SourceCodeKind sourceCodeKind, 531char? deletedCharTrigger, bool? hasSuggestionModeItem, SourceCodeKind sourceCodeKind, 565bool? hasSuggestionModeItem, SourceCodeKind sourceCodeKind, 583protected virtual async Task VerifyCustomCommitProviderWorkerAsync(string codeBeforeCommit, int position, string itemToCommit, string expectedCodeAfterCommit, SourceCodeKind sourceCodeKind, char? commitChar = null) 711char? commitChar, SourceCodeKind sourceCodeKind) 1069string code, int position, string insertText, bool usePreviousCharAsTrigger, char? deletedCharTrigger, bool? hasSuggestionItem, SourceCodeKind sourceCodeKind, 1083SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 1091SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, string partialItem, 1100SourceCodeKind sourceCodeKind, bool checkForAbsence, 1118SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 1131SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 1145SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 1164SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 1172SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, 1181SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 1206SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 1218SourceCodeKind sourceCodeKind, ItemExpectation[] expectedResults, string partialItem, 1228SourceCodeKind sourceCodeKind, bool checkForAbsence, Glyph? glyph, 1243SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 1254SourceCodeKind sourceCodeKind, 1301protected async Task VerifyCommitCharactersAsync(string initialMarkup, string textTypedSoFar, char[] validChars, char[] invalidChars = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular) 1333string markup, SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger = false)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (4)
24protected async Task AssertNavigatedAsync(string code, bool next, SourceCodeKind? sourceCodeKind = null) 28: [SourceCodeKind.Regular, SourceCodeKind.Script]; 30foreach (var kind in kinds)
RefactoringHelpers\RefactoringHelpersTestBase.cs (1)
106var document = workspaceFixture.Target.UpdateDocument(text, SourceCodeKind.Regular);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (8)
51SourceCodeKind? sourceCodeKind = null, 62await TestSignatureHelpWorkerAsync(markup, SourceCodeKind.Regular, experimental, expectedOrderedItemsOrNull, usePreviousCharAsTrigger); 63await TestSignatureHelpWorkerAsync(markup, SourceCodeKind.Script, experimental, expectedOrderedItemsOrNull, usePreviousCharAsTrigger); 69SourceCodeKind sourceCodeKind, 143protected virtual async Task VerifyCurrentParameterNameAsync(string markup, string expectedParameterName, SourceCodeKind? sourceCodeKind = null) 153await VerifyCurrentParameterNameWorkerAsync(markup, expectedParameterName, SourceCodeKind.Regular); 154await VerifyCurrentParameterNameWorkerAsync(markup, expectedParameterName, SourceCodeKind.Script); 164private async Task VerifyCurrentParameterNameWorkerAsync(string markup, string expectedParameterName, SourceCodeKind sourceCodeKind)
TypeInferrer\TypeInferrerTestBase.cs (2)
51SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
Workspaces\CSharpTestWorkspaceFixture.cs (1)
19parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Regular),
Workspaces\EditorTestHostDocument.cs (4)
49SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 82SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\EditorTestWorkspace.cs (4)
61SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 77SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspaceFixture.cs (1)
78public Document UpdateDocument(string text, SourceCodeKind sourceCodeKind, bool cleanBeforeUpdate = true)
Workspaces\VisualBasicTestWorkspaceFixture.cs (1)
19parseOptions: new VisualBasicParseOptions(kind: SourceCodeKind.Regular),
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
VS\IFSharpWorkspaceProjectContextFactory.cs (2)
35void AddSourceFile(string path, SourceCodeKind kind); 190public void AddSourceFile(string path, SourceCodeKind kind)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (6)
RazorDynamicFileInfo.cs (2)
17public RazorDynamicFileInfo(string filePath, SourceCodeKind sourceCodeKind, TextLoader textLoader, IRazorDocumentServiceProvider documentServiceProvider) 33public SourceCodeKind SourceCodeKind { get; }
Testing\AbstractRazorLanguageServerFactoryWrapper.cs (2)
23SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Testing\RazorTestLanguageServerFactory.cs (2)
50SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Features (8)
ExtractMethod\Extensions.cs (1)
68return node.SyntaxTree.Options.Kind != SourceCodeKind.Regular;
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
332SourceCodeKind.Regular, 343SourceCodeKind sourceCodeKind,
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
311if (Document.Document.SourceCodeKind != SourceCodeKind.Regular)
Workspace\MiscellaneousFileUtilities.cs (4)
45parseOptions = parseOptions.WithKind(SourceCodeKind.Script); 58var sourceCodeKind = parseOptions?.Kind ?? SourceCodeKind.Regular; 81hasAllInformation: sourceCodeKind == SourceCodeKind.Script),
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
500sourceCodeKind: SourceCodeKind.Regular,
Utils\Options.cs (2)
13internal static readonly CSharpParseOptions Script = new CSharpParseOptions(kind: SourceCodeKind.Script); 14internal static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
171sourceCodeKind: SourceCodeKind.Regular,
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.PublicApiAnalyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
DeterministicKeyBuilderTests.cs (3)
417SourceCodeKind sourceCodeKind, 425if (sourceCodeKind == SourceCodeKind.Interactive) 427sourceCodeKind = SourceCodeKind.Script;
Microsoft.CodeAnalysis.ResxSourceGenerator (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\CompilationExtensions.cs (1)
371if (blockOperation.Syntax.SyntaxTree.Options.Kind != SourceCodeKind.Script)
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\AnalysisContextInfoTests.cs (1)
26var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None)
Microsoft.CodeAnalysis.VisualBasic (17)
Binding\BinderFactory.vb (2)
36Return _tree.Options.Kind = SourceCodeKind.Script 165If node.Kind <> SyntaxKind.CompilationUnit OrElse _tree.Options.Kind = SourceCodeKind.Regular Then
CommandLine\VisualBasicCommandLineParser.vb (2)
1436kind:=If(IsScriptCommandLineParser, SourceCodeKind.Script, SourceCodeKind.Regular),
CommandLine\VisualBasicCompiler.vb (1)
95Dim scriptParseOptions = parseOptions.WithKind(SourceCodeKind.Script)
Declarations\DeclarationTreeBuilder.vb (2)
132Debug.Assert(parent.Kind = SyntaxKind.CompilationUnit AndAlso _syntaxTree.Options.Kind <> SourceCodeKind.Regular) 175If _syntaxTree.Options.Kind <> SourceCodeKind.Regular Then
Parser\Parser.vb (1)
81Return _scanner.Options.Kind = SourceCodeKind.Script
Parser\ParseStatement.vb (1)
1868If lookahead.Kind <> SyntaxKind.EndOfFileToken OrElse _scanner.Options.Kind = SourceCodeKind.Regular Then
Syntax\SyntaxFactory.vb (1)
1068If options.Kind = SourceCodeKind.Regular Then
Syntax\VisualBasicSyntaxTree.vb (1)
89Return Options.Kind = SourceCodeKind.Script AndAlso GetCompilationUnitRoot().GetReferenceDirectives().Count > 0
VisualBasicParseOptions.vb (6)
33''' <param name="kind">The kind of source code.<see cref="SourceCodeKind"/></param> 38Optional kind As SourceCodeKind = SourceCodeKind.Regular, 51kind As SourceCodeKind, 148Public Shadows Function WithKind(kind As SourceCodeKind) As VisualBasicParseOptions 210Public Overrides Function CommonWithKind(kind As SourceCodeKind) As ParseOptions
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (2)
GenerateVariable\GenerateVariableTests.vb (2)
1353New TestParameters(parseOptions:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))) 1363New TestParameters(parseOptions:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script),
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
VisualBasicScriptCompiler.vb (1)
18Private Shared ReadOnly s_defaultOptions As VisualBasicParseOptions = New VisualBasicParseOptions(kind:=SourceCodeKind.Script, languageVersion:=LanguageVersion.Latest)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (10)
Compilation\VisualBasicCompilationOptionsTests.vb (1)
103New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
Diagnostics\GetDiagnosticsTests.vb (1)
247Dim compilation = CreateCompilationWithMscorlib461(String.Empty, parseOptions:=New VisualBasicParseOptions().WithKind(SourceCodeKind.Interactive))
Semantics\ScriptSemanticsTests.vb (8)
42Dim compilationUnit = VisualBasic.SyntaxFactory.ParseCompilationUnit(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 60syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 69syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 78syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 91syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 104syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 120Dim compilationUnit = VisualBasic.SyntaxFactory.ParseCompilationUnit("System.Console.WriteLine(1)", options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 122Dim syntaxTree2 = SyntaxFactory.ParseSyntaxTree("System.Console.WriteLine(2)", options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (41)
Parser\VisualBasicParseOptionsTests.vb (25)
22TestProperty(Function(old, value) old.WithKind(value), Function(opt) opt.Kind, SourceCodeKind.Script) 245Assert.Equal(SourceCodeKind.Regular, options.Kind) 246Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind) 250options = New VisualBasicParseOptions(kind:=SourceCodeKind.Regular) 251Assert.Equal(SourceCodeKind.Regular, options.Kind) 252Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind) 256options = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 257Assert.Equal(SourceCodeKind.Script, options.Kind) 258Assert.Equal(SourceCodeKind.Script, options.SpecifiedKind) 263options = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 264Assert.Equal(SourceCodeKind.Script, options.Kind) 265Assert.Equal(SourceCodeKind.Interactive, options.SpecifiedKind) 270options = New VisualBasicParseOptions(kind:=CType(Int32.MinValue, SourceCodeKind)) 271Assert.Equal(SourceCodeKind.Regular, options.Kind) 272Assert.Equal(CType(Int32.MinValue, SourceCodeKind), options.SpecifiedKind) 279Dim options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 280Dim options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 286options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 287options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 295Dim options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 296Dim options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 302options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 303options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 312Dim options = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 345Dim options = New VisualBasicParseOptions().WithKind(SourceCodeKind.Interactive)
Syntax\SyntaxRewriterTests.vb (16)
529Assert.Equal(SourceCodeKind.Script, tree.Options.Kind) 537Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 546Assert.Equal(SourceCodeKind.Script, tree.Options.Kind) 556Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 565Assert.Equal(SourceCodeKind.Script, tree.Options.Kind) 576Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 583Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind) 592Assert.Equal(SourceCodeKind.Script, tree.Options.Kind) 603Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 621Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 627Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind) 648Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 654Assert.Equal(SourceCodeKind.Script, newTree2.Options.Kind) 676Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 689Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind) 702Assert.Equal(SourceCodeKind.Script, newTree.Options.Kind)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
TestOptions.vb (2)
11Public Shared ReadOnly Script As New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 12Public Shared ReadOnly Regular As New VisualBasicParseOptions(kind:=SourceCodeKind.Regular)
Microsoft.CodeAnalysis.Workspaces (52)
Serialization\AbstractOptionsSerializationService.cs (3)
206protected static (SourceCodeKind kind, DocumentationMode documentationMode, IEnumerable<KeyValuePair<string, string>> features) ReadParseOptionsPieces( 212var kind = (SourceCodeKind)reader.ReadInt32();
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Workspace\CommandLineProject.cs (2)
167sourceCodeKind: fileArg.IsScript ? SourceCodeKind.Script : SourceCodeKind.Regular,
Workspace\Host\SourceFiles\DynamicFileInfo.cs (2)
13internal sealed class DynamicFileInfo(string filePath, SourceCodeKind sourceCodeKind, TextLoader textLoader, bool designTimeOnly, IDocumentServiceProvider? documentServiceProvider) 24public SourceCodeKind SourceCodeKind { get; } = sourceCodeKind;
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
99public DocumentId AddFile(string fullPath, SourceCodeKind sourceCodeKind, ImmutableArray<string> folders) 146SourceCodeKind sourceCodeKind,
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
848public void AddSourceFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, ImmutableArray<string> folders = default) 863SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 885public void AddAdditionalFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, ImmutableArray<string> folders = default) 901_analyzerConfigFiles.AddFile(fullPath, SourceCodeKind.Regular, folders: default);
Workspace\Solution\Document.cs (2)
55public SourceCodeKind SourceCodeKind => DocumentState.SourceCodeKind; 384public Document WithSourceCodeKind(SourceCodeKind kind)
Workspace\Solution\DocumentInfo.cs (11)
41public SourceCodeKind SourceCodeKind => Attributes.SourceCodeKind; 80SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 126public DocumentInfo WithSourceCodeKind(SourceCodeKind kind) 152SourceCodeKind sourceCodeKind, 177public SourceCodeKind SourceCodeKind { get; } = sourceCodeKind; 199Optional<SourceCodeKind> sourceCodeKind = default, 207var newSourceCodeKind = sourceCodeKind.HasValue ? sourceCodeKind.Value : SourceCodeKind; 230=> FilePath ?? (SourceCodeKind == SourceCodeKind.Regular ? Name : ""); 250var sourceCodeKind = (SourceCodeKind)reader.ReadByte();
Workspace\Solution\DocumentState.cs (2)
96public SourceCodeKind SourceCodeKind 384public DocumentState UpdateSourceCodeKind(SourceCodeKind kind)
Workspace\Solution\ProjectChanges.cs (1)
124/// otherwise get documents with any changes i.e. <see cref="ParseOptions"/>, <see cref="SourceCodeKind"/> and file path.
Workspace\Solution\Solution.cs (5)
932private static SourceCodeKind GetSourceCodeKind(ProjectState project) 933=> project.ParseOptions != null ? project.ParseOptions.Kind : SourceCodeKind.Regular; 1412public Solution WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind) 1417if (sourceCodeKind == SourceCodeKind.Interactive) 1419sourceCodeKind = SourceCodeKind.Script;
Workspace\Solution\SolutionCompilationState.cs (1)
1042DocumentId documentId, SourceCodeKind sourceCodeKind)
Workspace\Solution\SolutionState.cs (1)
1100public StateChange WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind)
Workspace\Workspace.cs (2)
1376protected internal void OnDocumentSourceCodeKindChanged(DocumentId documentId, SourceCodeKind sourceCodeKind) 2077doc is Document sourceDoc ? sourceDoc.SourceCodeKind : SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
441SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (26)
TestDynamicFileInfoProviderThatProducesFiles.cs (1)
34SourceCodeKind.Regular,
WorkspaceExtensions.cs (2)
15public static DocumentId AddDocument(this Workspace workspace, ProjectId projectId, IEnumerable<string> folders, string name, SourceText initialText, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
Workspaces\TestHostDocument.cs (5)
63public SourceCodeKind SourceCodeKind { get; } 96SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 133SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspace.cs (4)
38SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 54SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspace_XmlConsumption.cs (5)
621var codeKind = SourceCodeKind.Regular; 626? SourceCodeKind.Regular 627: (SourceCodeKind)Enum.Parse(typeof(SourceCodeKind), attr.Value);
Workspaces\TestWorkspace`1.cs (9)
173SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 188SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 219return parseOptions.Kind == SourceCodeKind.Regular 225return parseOptions.Kind == SourceCodeKind.Regular 297public new void OnDocumentSourceCodeKindChanged(DocumentId documentId, SourceCodeKind sourceCodeKind) 725var document = CreateDocument(exportProvider, languageServices, code, submissionName, submissionName, cursorPosition, spans, SourceCodeKind.Script); 751var parseOptions = syntaxFactory.GetDefaultParseOptions().WithKind(SourceCodeKind.Script);
Microsoft.CodeAnalysis.Workspaces.UnitTests (54)
SolutionTests\DocumentInfoTests.cs (11)
39sourceCodeKind: SourceCodeKind.Script, 45Assert.Equal(SourceCodeKind.Script, info.SourceCodeKind); 58sourceCodeKind: SourceCodeKind.Script, 64Assert.Equal(SourceCodeKind.Script, info.SourceCodeKind); 88[InlineData(SourceCodeKind.Script, null, "")] 89[InlineData(SourceCodeKind.Script, "", "")] 90[InlineData(SourceCodeKind.Script, "path", "path")] 91[InlineData(SourceCodeKind.Regular, null, "doc_name")] 92[InlineData(SourceCodeKind.Regular, "", "")] 93[InlineData(SourceCodeKind.Regular, "path", "path")] 94public void Create_FilePath(SourceCodeKind kind, string path, string expectedSyntaxTreeFilePath)
SolutionTests\SolutionTests.cs (36)
253Assert.Same(solution, solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Regular)); 255var newSolution1 = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Script); 256Assert.Equal(SourceCodeKind.Script, newSolution1.GetRequiredDocument(documentId).SourceCodeKind); 258Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentSourceCodeKind(documentId, (SourceCodeKind)(-1))); 260Assert.Throws<ArgumentNullException>(() => solution.WithDocumentSourceCodeKind(null!, SourceCodeKind.Script)); 261Assert.Throws<InvalidOperationException>(() => solution.WithDocumentSourceCodeKind(s_unrelatedDocumentId, SourceCodeKind.Script)); 273solution = solution.WithProjectParseOptions(projectId, CSharpParseOptions.Default.WithKind(SourceCodeKind.Script)); 276Assert.Equal(SourceCodeKind.Script, document1.DocumentState.ParseOptions?.Kind); 277Assert.Equal(SourceCodeKind.Script, document1.SourceCodeKind); 279var document2 = document1.WithSourceCodeKind(SourceCodeKind.Regular); 280Assert.Equal(SourceCodeKind.Regular, document2.DocumentState.ParseOptions?.Kind); 281Assert.Equal(SourceCodeKind.Regular, document2.SourceCodeKind); 291var newSolution = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Interactive); 292Assert.Equal(SourceCodeKind.Script, newSolution.GetDocument(documentId)!.SourceCodeKind); 1105sourceCodeKind: SourceCodeKind.Script, 1114sourceCodeKind: SourceCodeKind.Regular, 1124sourceCodeKind: SourceCodeKind.Script, 1133sourceCodeKind: SourceCodeKind.Regular, 1143sourceCodeKind: SourceCodeKind.Script, 1152sourceCodeKind: SourceCodeKind.Regular, 2364WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2373Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 2390WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2405Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 2420WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2433Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 2472WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2485Assert.Equal(SourceCodeKind.Script, document2.SourceCodeKind); 2501WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2524Assert.Equal(SourceCodeKind.Script, document2.SourceCodeKind); 2535WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 3850var newOptions = tree.Options.WithKind(SourceCodeKind.Script); 4931.AddDocument(DocumentInfo.Create(documentId, "Test", sourceCodeKind: SourceCodeKind.Script)); 4934Assert.Equal(SourceCodeKind.Script, document1.SourceCodeKind); 4937var document2 = document1.WithSourceCodeKind(SourceCodeKind.Regular); 4938Assert.Equal(SourceCodeKind.Regular, document2.SourceCodeKind);
WorkspaceTests\AdhocWorkspaceTests.cs (4)
515Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind); 517var changedDoc = originalDoc.WithSourceCodeKind(SourceCodeKind.Script); 518Assert.Equal(SourceCodeKind.Script, changedDoc.SourceCodeKind); 533Assert.Equal(SourceCodeKind.Script, appliedDoc.SourceCodeKind);
WorkspaceTests\WorkspaceTests.cs (3)
91Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind); 93var changedDoc = originalDoc.WithSourceCodeKind(SourceCodeKind.Script); 94Assert.Equal(SourceCodeKind.Script, changedDoc.SourceCodeKind);
Microsoft.VisualStudio.LanguageServices (8)
ExternalAccess\VSTypeScript\Api\VSTypeScriptVisualStudioProjectWrapper.cs (2)
25=> Project.AddSourceFile(fullPath, SourceCodeKind.Regular); 30return Project.AddSourceTextContainer(sourceTextContainer, fullPath, SourceCodeKind.Regular, documentServiceProvider: documentServiceProvider);
ProjectSystem\CPS\IWorkspaceProjectContext.cs (2)
56void AddSourceFile(string filePath, bool isInCurrentContext = true, IEnumerable<string>? folderNames = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular);
ProjectSystem\Legacy\AbstractLegacyProject.cs (2)
179SourceCodeKind sourceCodeKind) 199SourceCodeKind sourceCodeKind)
ProjectSystem\Legacy\AbstractLegacyProject_IProjectSiteEx.cs (1)
33AddFile(filePath, linkMetadata, SourceCodeKind.Regular);
Venus\ContainedLanguage.cs (1)
105sourceCodeKind: SourceCodeKind.Regular,
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
49AddFile(filename, SourceCodeKind.Regular);
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
230return ((CSharpParseOptions)parseOptions).WithKind(SourceCodeKind.Regular)
Microsoft.VisualStudio.LanguageServices.UnitTests (6)
LanguageBlockTests.vb (6)
216", LanguageNames.CSharp, SourceCodeKind.Script) 221", LanguageNames.CSharp, SourceCodeKind.Regular) 229", LanguageNames.VisualBasic, SourceCodeKind.Script) 234", LanguageNames.VisualBasic, SourceCodeKind.Regular) 237Private Shared Sub VerifyNoBlock(markup As String, languageName As String, Optional sourceCodeKind As SourceCodeKind = SourceCodeKind.Regular)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\VisualBasicProject.vb (1)
98MyBase.AddFile(wszFileName, SourceCodeKind.Regular)
Roslyn.Diagnostics.Analyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
411=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
311document = document.WithSourceCodeKind(SourceCodeKind.Script);
StackDepthTest (1)
Program.cs (1)
77var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None);
Test.Utilities (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Text.Analyzers (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (10)
9internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) 13case SourceCodeKind.Script: 15case SourceCodeKind.Interactive: 17return SourceCodeKind.Script; 19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 25internal static bool IsValid(this SourceCodeKind value) 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
39=> syntaxTree.Options.Kind != SourceCodeKind.Regular;