1517 references to SourceCodeKind
Microsoft.CodeAnalysis (17)
Compilation\Compilation.cs (1)
1049Debug.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.CodeStyle (11)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
37=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
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.CodeStyle.LegacyTestFramework.UnitTestUtilities (2)
AbstractCodeActionOrUserDiagnosticTest.cs (2)
266=> parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Regular)); 269=> parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Script) ?? GetScriptOptions());
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder_Initializers.cs (1)
195Debug.Assert(syntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\Binder_Patterns.cs (1)
897Debug.Assert(designation.SyntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
424if (node.Parent.Kind() == SyntaxKind.CompilationUnit && syntaxTree.Options.Kind != SourceCodeKind.Regular)
Binder\BinderFactory.cs (1)
92return _syntaxTree.Options.Kind == SourceCodeKind.Script;
CommandLine\CSharpCommandLineParser.cs (2)
1462kind: IsScriptCommandLineParser ? SourceCodeKind.Script : SourceCodeKind.Regular,
CommandLine\CSharpCompiler.cs (1)
49var scriptParseOptions = parseOptions.WithKind(SourceCodeKind.Script);
Compilation\CSharpCompilation.cs (1)
865if (this.IsSubmission && tree.Options.Kind == SourceCodeKind.Regular)
Compilation\SyntaxAndDeclarationManager.cs (4)
155var sourceCodeKind = tree.Options.Kind; 156if (sourceCodeKind == SourceCodeKind.Script) 588var sourceCodeKind = tree.Options.Kind; 589if (sourceCodeKind == SourceCodeKind.Script)
Compilation\SyntaxTreeSemanticModel.cs (2)
1305return this.SyntaxTree.Options.Kind == SourceCodeKind.Regular; 2305if (this.SyntaxTree.Options.Kind != SourceCodeKind.Regular)
CSharpParseOptions.cs (6)
51SourceCodeKind kind = SourceCodeKind.Regular, 64SourceCodeKind kind, 86public new CSharpParseOptions WithKind(SourceCodeKind kind) 93var effectiveKind = kind.MapSpecifiedToEffectiveKind(); 143public override ParseOptions CommonWithKind(SourceCodeKind kind)
Declarations\DeclarationTreeBuilder.cs (5)
55(node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular)); 65bool acceptSimpleProgram = node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular; 182Debug.Assert(_syntaxTree.Options.Kind != SourceCodeKind.Regular); 242Debug.Assert(parent.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind != SourceCodeKind.Regular); 308if (_syntaxTree.Options.Kind != SourceCodeKind.Regular)
Parser\DirectiveParser.cs (3)
113if (lexer.Options.Kind == SourceCodeKind.Script && contextualKind == SyntaxKind.ExclamationToken && hashPosition == 0 && !hash.HasTrailingTrivia) 497if (Options.Kind == SourceCodeKind.Regular) 517if (Options.Kind == SourceCodeKind.Regular)
Parser\SyntaxParser.cs (1)
209get { return Options.Kind == SourceCodeKind.Script; }
Syntax\CSharpSyntaxTree.cs (2)
137return Options.Kind == SourceCodeKind.Script && GetCompilationUnitRoot().HasReferenceDirectives; 147if (Options.Kind == SourceCodeKind.Script)
Syntax\SyntaxFactory.cs (2)
2309if (tree.Options.Kind != SourceCodeKind.Script) 2367if (tree.Options.Kind == SourceCodeKind.Regular ||
Syntax\SyntaxFacts.cs (1)
525return IsTopLevelStatement(syntax) && syntax.SyntaxTree.Options.Kind == SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
CSharpSyntaxContext.cs (1)
405=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
24new(languageVersion: LanguageVersion.Latest, kind: SourceCodeKind.Script);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (219)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (5)
51SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 67SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, 93SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 112SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 127SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph,
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (6)
45", SourceCodeKind.Regular)).Single(); 90", SourceCodeKind.Regular); 249", SourceCodeKind.Regular); 277", SourceCodeKind.Regular); 449", SourceCodeKind.Regular); 510", SourceCodeKind.Regular);
Completion\CompletionProviders\CrefCompletionProviderTests.cs (1)
32string expectedDescriptionOrNull, SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger,
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
1169var items = await GetCompletionItemsAsync(markup, SourceCodeKind.Regular);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
816return (fixture.UpdateDocument(text, SourceCodeKind.Regular), position);
Completion\CompletionProviders\ExtensionMethodImportCompletionProviderTests.cs (1)
1925await VerifyProviderCommitAsync(markup, "ToInt", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular);
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (2)
113await VerifyNoItemsExistAsync(markup, SourceCodeKind.Script); 133await VerifyNoItemsExistAsync(markup, SourceCodeKind.Script);
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (3)
35SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 51await VerifyCommitCharactersAsync("#load \"$$", textTypedSoFar: "", validChars: commitCharacters, sourceCodeKind: SourceCodeKind.Script); 62=> VerifyTextualTriggerCharacter(markup, shouldTriggerWithTriggerOnLettersEnabled: true, shouldTriggerWithTriggerOnLettersDisabled: true, SourceCodeKind.Script);
Completion\CompletionProviders\OperatorCompletionProviderTests.cs (4)
89", SourceCodeKind.Regular); 225", SourceCodeKind.Regular); 302", SourceCodeKind.Regular); 452", SourceCodeKind.Regular);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (4)
841await BaseVerifyWorkerAsync(code, position, "@class()", "void Base.@class()", SourceCodeKind.Regular, false, false, null, null, null, null, null, null); 842await BaseVerifyWorkerAsync(code, position, "@class()", "void Base.@class()", SourceCodeKind.Script, false, false, null, null, null, null, null, null); 859await BaseVerifyWorkerAsync(code, position, "@class", "int Base.@class { get; set; }", SourceCodeKind.Regular, false, false, null, null, null, null, null, null); 860await BaseVerifyWorkerAsync(code, position, "@class", "int Base.@class { get; set; }", SourceCodeKind.Script, false, false, null, null, null, null, null, null);
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (6)
38SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 54await VerifyCommitCharactersAsync("#r \"$$", textTypedSoFar: "", validChars: commitCharacters, sourceCodeKind: SourceCodeKind.Script); 65=> VerifyTextualTriggerCharacter(markup, shouldTriggerWithTriggerOnLettersEnabled: true, shouldTriggerWithTriggerOnLettersDisabled: true, SourceCodeKind.Script); 76=> await VerifyItemExistsAsync("#r \"$$", "System.Windows.Forms", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 83"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 98await 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); 125await VerifyItemIsAbsentAsync(@"#r f$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script); 126await VerifyItemIsAbsentAsync(@"#load f$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script); 127await VerifyItemIsAbsentAsync(@"#!$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\Snippets\CSharpForEachSnippetCompletionProviderTests.cs (2)
230await VerifyCustomCommitProviderAsync(markupBeforeCommit, ItemToCommit, expectedCodeAfterCommit, sourceCodeKind: SourceCodeKind.Regular); 252await VerifyCustomCommitProviderAsync(markupBeforeCommit, ItemToCommit, expectedCodeAfterCommit, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SpeculativeTCompletionProviderTests.cs (6)
775await VerifyItemExistsAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 783await VerifyItemIsAbsentAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 791await VerifyItemIsAbsentAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 802await VerifyItemExistsAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 813await VerifyItemExistsAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 824await VerifyItemExistsAsync(markup, "T", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (2)
1397var document1 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular); 1402var document2 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular, cleanBeforeUpdate: false);
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (92)
30[InlineData(SourceCodeKind.Regular)] 31[InlineData(SourceCodeKind.Script)] 32public async Task EmptyFile(SourceCodeKind sourceCodeKind) 39[InlineData(SourceCodeKind.Regular)] 40[InlineData(SourceCodeKind.Script)] 41public async Task EmptyFileWithUsing(SourceCodeKind sourceCodeKind) 51=> await VerifyItemIsAbsentAsync(@"#r $$", "@System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 55=> await VerifyItemIsAbsentAsync(@"#load $$", "@System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 264await VerifyItemIsAbsentAsync("#r \"$$", "String", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 265await VerifyItemIsAbsentAsync("#r \"$$", "System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 278await VerifyItemIsAbsentAsync("#r \"$$\"", "String", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 279await VerifyItemIsAbsentAsync("#r \"$$\"", "System", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 365await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 377await VerifyItemExistsAsync(source, "Runtime", sourceCodeKind: SourceCodeKind.Regular); 387await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 388await VerifyItemIsAbsentAsync(source, "String", sourceCodeKind: SourceCodeKind.Regular); 398await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 399await VerifyItemIsAbsentAsync(source, "String", sourceCodeKind: SourceCodeKind.Regular); 410await VerifyItemExistsAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 422await VerifyNoItemsExistAsync(source, sourceCodeKind: SourceCodeKind.Regular); 436await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 437await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 445await VerifyItemIsAbsentAsync(source, "NS", sourceCodeKind: SourceCodeKind.Regular); 460await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 461await VerifyItemIsAbsentAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 478await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 479await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 487await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 488await VerifyItemIsAbsentAsync(source, "Runtime", sourceCodeKind: SourceCodeKind.Regular); 517await VerifyItemIsAbsentAsync(source, "C1", sourceCodeKind: SourceCodeKind.Regular); 518await VerifyItemIsAbsentAsync(source, "C2", sourceCodeKind: SourceCodeKind.Regular); 519await VerifyItemIsAbsentAsync(source, "C3", sourceCodeKind: SourceCodeKind.Regular); 521await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 525await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 533await VerifyNoItemsExistAsync(source, sourceCodeKind: SourceCodeKind.Regular); 544await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 555await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 569await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 570await VerifyItemIsAbsentAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 571await VerifyItemExistsAsync(source, "C", sourceCodeKind: SourceCodeKind.Regular); 584await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 585await VerifyItemIsAbsentAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 600await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 601await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 609await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 610await VerifyItemIsAbsentAsync(source, "Runtime", sourceCodeKind: SourceCodeKind.Regular); 618await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 630await VerifyItemIsAbsentAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 631await VerifyItemIsAbsentAsync(source, "Runtime", sourceCodeKind: SourceCodeKind.Regular); 652await VerifyItemIsAbsentAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 653await VerifyItemIsAbsentAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 654await VerifyItemIsAbsentAsync(source, "C", sourceCodeKind: SourceCodeKind.Regular); 664await VerifyItemIsAbsentAsync(source, "D1", sourceCodeKind: SourceCodeKind.Regular); 665await VerifyItemIsAbsentAsync(source, "D2", sourceCodeKind: SourceCodeKind.Regular); 666await VerifyItemIsAbsentAsync(source, "D3", sourceCodeKind: SourceCodeKind.Regular); 1547await VerifyItemExistsAsync(prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1557await VerifyItemIsAbsentAsync(prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Script); 1569", "args", sourceCodeKind: SourceCodeKind.Regular); 1581" + prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1595", "args", sourceCodeKind: SourceCodeKind.Regular); 1605await VerifyItemExistsAsync("call(" + prefix + "$$)", "args", sourceCodeKind: SourceCodeKind.Regular); 1611=> await VerifyItemIsAbsentAsync(@"$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1619$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1626$$", "args", sourceCodeKind: SourceCodeKind.Regular); 1630=> await VerifyItemExistsAsync(@"string first = $$", "args", sourceCodeKind: SourceCodeKind.Regular); 2574await VerifyItemExistsAsync(markup, "Q", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 2575await VerifyItemIsAbsentAsync(markup, "R", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 2589await VerifyItemExistsAsync(markup, "Q", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 2590await VerifyItemIsAbsentAsync(markup, "R", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 2689await VerifyItemExistsAsync(markup, "String", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 2700await VerifyItemExistsAsync(markup, "ElementAt", displayTextSuffix: "<>", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 2758await VerifyItemIsAbsentAsync(markup, "Console", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3141await VerifyItemExistsAsync(markup, "My", sourceCodeKind: SourceCodeKind.Regular); 3142await VerifyItemIsAbsentAsync(markup, "MyAttribute", sourceCodeKind: SourceCodeKind.Regular); 3152await VerifyItemExistsAsync(markup, "namespaceAttribute", sourceCodeKind: SourceCodeKind.Regular); 3153await VerifyItemIsAbsentAsync(markup, "namespace", sourceCodeKind: SourceCodeKind.Regular); 3154await VerifyItemIsAbsentAsync(markup, "@namespace", sourceCodeKind: SourceCodeKind.Regular); 3755expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3765expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3775expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 3785expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Script); 7131await VerifyItemExistsAsync(markup, "CommandLine", sourceCodeKind: SourceCodeKind.Script); 7474await VerifyItemExistsAsync(markup, "ForSchemaSet", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 7562=> await VerifyItemIsAbsentAsync(@"base.$$", @"ToString", sourceCodeKind: SourceCodeKind.Script); 8573await VerifyItemExistsAsync(markup, "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 8598await VerifyItemExistsAsync(markup, "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 9576await VerifyItemExistsAsync(markup, "aaa", sourceCodeKind: SourceCodeKind.Script); 9586await VerifyItemExistsAsync(markup, "aaa", sourceCodeKind: SourceCodeKind.Script); 9646await VerifyNoItemsExistAsync("#!$$", sourceCodeKind: SourceCodeKind.Script); 9647await VerifyNoItemsExistAsync("#! S$$", sourceCodeKind: SourceCodeKind.Script, usePreviousCharAsTrigger: true); 10599await VerifyItemExistsAsync(markup, "Length", sourceCodeKind: SourceCodeKind.Regular); 10618await VerifyItemExistsAsync(markup, "Length", sourceCodeKind: SourceCodeKind.Script);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (2)
33SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 40SourceCodeKind.Regular, usePreviousCharAsTrigger, checkForAbsence,
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (41)
804[InlineData(SourceCodeKind.Regular)] 805[InlineData(SourceCodeKind.Script)] 807public async Task Commit_NoImport_InProject(SourceCodeKind kind) 839[InlineData(SourceCodeKind.Regular)] 840[InlineData(SourceCodeKind.Script)] 842public async Task Commit_TopLevelStatement_NoImport_InProject(SourceCodeKind kind) 862[InlineData(SourceCodeKind.Regular)] 863[InlineData(SourceCodeKind.Script)] 865public async Task Commit_TopLevelStatement_UnrelatedImport_InProject(SourceCodeKind kind) 889[InlineData(SourceCodeKind.Regular)] 890[InlineData(SourceCodeKind.Script)] 892public async Task Commit_NoImport_InVBReference(SourceCodeKind kind) 921[InlineData(SourceCodeKind.Regular)] 922[InlineData(SourceCodeKind.Script)] 924public async Task Commit_NoImport_InPEReference(SourceCodeKind kind) 1061[InlineData(SourceCodeKind.Regular)] 1062[InlineData(SourceCodeKind.Script)] 1065public async Task CommitAttributeTypeInAttributeNameContext(SourceCodeKind kind) 1121[InlineData(SourceCodeKind.Regular)] 1122[InlineData(SourceCodeKind.Script)] 1125public async Task CommitAttributeTypeInNonAttributeNameContext(SourceCodeKind kind) 1181[InlineData(SourceCodeKind.Regular)] 1182[InlineData(SourceCodeKind.Script)] 1185public async Task CommitAttributeTypeWithoutSuffixInAttributeNameContext(SourceCodeKind kind) 1241[InlineData(SourceCodeKind.Regular)] 1242[InlineData(SourceCodeKind.Script)] 1245public async Task CommitAttributeTypeWithoutSuffixInNonAttributeNameContext(SourceCodeKind kind) 1306[InlineData(SourceCodeKind.Regular)] 1307[InlineData(SourceCodeKind.Script)] 1310public async Task CommitTypeInUsingStaticContextShouldUseFullyQualifiedName(SourceCodeKind kind) 1328[InlineData(SourceCodeKind.Regular)] 1329[InlineData(SourceCodeKind.Script)] 1332public async Task CommitGenericTypeParameterInUsingAliasContextShouldUseFullyQualifiedName(SourceCodeKind kind) 1350[InlineData(SourceCodeKind.Regular)] 1351[InlineData(SourceCodeKind.Script)] 1354public async Task CommitGenericTypeParameterInUsingAliasContextShouldUseFullyQualifiedName2(SourceCodeKind kind) 1605await VerifyProviderCommitAsync(markup, "C", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1650await VerifyProviderCommitAsync(markup, "C", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1653[InlineData(SourceCodeKind.Regular)] 1654[InlineData(SourceCodeKind.Script)] 1657public async Task CommitInLocalFunctionContext(SourceCodeKind kind)
Completion\CompletionProviders\XmlDocumentationCommentCompletionProviderTests.cs (5)
44SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 463", "args", sourceCodeKind: SourceCodeKind.Regular); 477", "args", sourceCodeKind: SourceCodeKind.Script); 489", "str", sourceCodeKind: SourceCodeKind.Regular); 500", "str", sourceCodeKind: SourceCodeKind.Script);
Debugging\LocationInfoGetterTests.cs (3)
484", "f1", 0, new CSharpParseOptions(kind: SourceCodeKind.Script)); 494", "M1(int x)", 2, new CSharpParseOptions(kind: SourceCodeKind.Script)); 504", null, 0, new CSharpParseOptions(kind: SourceCodeKind.Script));
ExtractMethod\ExtractMethodTests.cs (1)
10380await TestExtractMethodAsync(code, expected, parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Script));
ExtractMethod\ExtractMethodTests.LanguageInteraction.cs (1)
1356await TestExtractMethodAsync(code, expected, parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Script));
Formatting\RazorLineFormattingOptionsTests.cs (1)
61sourceCodeKind: SourceCodeKind.Regular,
GoToAdjacentMember\CSharpGoToAdjacentMemberTests.cs (2)
500await AssertNavigatedAsync(code, next: true, sourceCodeKind: SourceCodeKind.Script); 511await AssertNavigatedAsync(code, next: false, sourceCodeKind: SourceCodeKind.Script);
SignatureHelp\GenericNamePartiallyWrittenSignatureHelpProviderTests.cs (2)
131await TestAsync(markup, expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular); 308await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\GenericNameSignatureHelpProviderTests.cs (1)
553await TestAsync(markup, expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular);
SignatureHelp\InitializerExpressionSignatureHelpProviderTests.cs (1)
215await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.cs (2)
427await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular); 1791await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
TypeInferrer\TypeInferrerTests.cs (2)
1281@"yield return [|abc|]", "global::System.Object", mode, sourceCodeKind: SourceCodeKind.Script); 1441@"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)
211var document1 = new TestHostDocument("var x = 1;", displayName: "Sub1", sourceCodeKind: SourceCodeKind.Script); 214var document2 = new TestHostDocument("var x = 2;", displayName: "Sub2", sourceCodeKind: SourceCodeKind.Script, filePath: "a.csx");
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (782)
Recommendations\AbstractKeywordRecommenderTests.cs (10)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Script, 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 203await VerifyAbsenceAsync(SourceCodeKind.Script, 281await VerifyKeywordAsync(SourceCodeKind.Regular, 288await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\AddKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AliasKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AnnotationsKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AscendingKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AsKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AssemblyKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\AsyncKeywordRecommenderTests.cs (2)
64await VerifyKeywordAsync(SourceCodeKind.Script, text); 71await VerifyKeywordAsync(SourceCodeKind.Script, text);
Recommendations\BaseKeywordRecommenderTests.cs (4)
19await VerifyAbsenceAsync(SourceCodeKind.Script, 26await VerifyAbsenceAsync(SourceCodeKind.Script, 36await VerifyAbsenceAsync(SourceCodeKind.Script, 117SourceCodeKind.Regular,
Recommendations\BoolKeywordRecommenderTests.cs (1)
25await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\BreakKeywordRecommenderTests.cs (1)
24await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ByKeywordRecommenderTests.cs (1)
24await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ByteKeywordRecommenderTests.cs (1)
25await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\CaseKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\CatchKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\CharKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\CheckedKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ChecksumKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ClassKeywordRecommenderTests.cs (12)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Script, 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 203await VerifyAbsenceAsync(SourceCodeKind.Script, 305await VerifyKeywordAsync(SourceCodeKind.Regular, 359await VerifyAbsenceAsync(SourceCodeKind.Regular, 369await VerifyAbsenceAsync(SourceCodeKind.Regular, 379await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ConstKeywordRecommenderTests.cs (14)
130[InlineData(SourceCodeKind.Regular)] 131[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")] 132public async Task TestNotBeforeUsing(SourceCodeKind sourceCodeKind) 140[InlineData(SourceCodeKind.Regular)] 141[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")] 142public async Task TestNotBeforeGlobalUsing(SourceCodeKind sourceCodeKind) 159await VerifyKeywordAsync(SourceCodeKind.Regular, @"[goo] 166await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo] 219=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 223=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 235=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 239=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 252await VerifyAbsenceAsync(SourceCodeKind.Regular, 259await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ContinueKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DecimalKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DefaultKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DefineKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DelegateKeywordRecommenderTests.cs (14)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 187await VerifyAbsenceAsync(SourceCodeKind.Regular, 195await VerifyAbsenceAsync(SourceCodeKind.Script, 203await VerifyAbsenceAsync(SourceCodeKind.Regular, 211await VerifyAbsenceAsync(SourceCodeKind.Script, 307await VerifyKeywordAsync(SourceCodeKind.Regular, @"static $$"); 308await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 315await VerifyKeywordAsync(SourceCodeKind.Regular, AddInsideMethod(@$"{keyword} $$")); 316await VerifyKeywordAsync(SourceCodeKind.Script, AddInsideMethod(@$"{keyword} $$")); 322await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 323await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\DescendingKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DisableKeywordRecommenderTests.cs (4)
31await VerifyAbsenceAsync(SourceCodeKind.Script, 38await VerifyAbsenceAsync(SourceCodeKind.Script, 46await VerifyAbsenceAsync(SourceCodeKind.Script, 54await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\DoKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DoubleKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DynamicKeywordRecommenderTests.cs (4)
29await VerifyKeywordAsync(SourceCodeKind.Script, 36await VerifyKeywordAsync(SourceCodeKind.Script, 44await VerifyKeywordAsync(SourceCodeKind.Script, 52await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ElifKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ElseKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EnableKeywordRecommenderTests.cs (4)
34=> await VerifyAbsenceAsync(SourceCodeKind.Script, @"$$"); 39await VerifyAbsenceAsync(SourceCodeKind.Script, 47await VerifyAbsenceAsync(SourceCodeKind.Script, 55await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EndIfKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EndRegionKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EnumKeywordRecommenderTests.cs (8)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 152await VerifyAbsenceAsync(SourceCodeKind.Regular, 160await VerifyAbsenceAsync(SourceCodeKind.Script, 168await VerifyAbsenceAsync(SourceCodeKind.Regular, 176await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EqualsKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ErrorKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\EventKeywordRecommenderTests.cs (32)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script, 70=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 75await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo; 82await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo; 89await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo; 96await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo; 103await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo; 110await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo; 117await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {} 124await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {} 131await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo(); 165await VerifyAbsenceAsync(SourceCodeKind.Regular, 173await VerifyAbsenceAsync(SourceCodeKind.Script, 181await VerifyAbsenceAsync(SourceCodeKind.Regular, 189await VerifyAbsenceAsync(SourceCodeKind.Script, 197await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo] 204await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo] 211await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo] 218await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo] 275=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 279=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 291=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 295=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 308await VerifyAbsenceAsync(SourceCodeKind.Regular, 315await VerifyKeywordAsync(SourceCodeKind.Script, 364=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 368=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 380=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 384=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\ExplicitKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FalseKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\FieldKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FinallyKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FixedKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\FloatKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ForEachKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 31await VerifyKeywordAsync(SourceCodeKind.Script, 39await VerifyKeywordAsync(SourceCodeKind.Script, 55await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ForKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\FromKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\GetKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\GlobalKeywordRecommenderTests.cs (2)
262await VerifyAbsenceAsync(SourceCodeKind.Regular, 270await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\GotoKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\GroupKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\HiddenKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IfKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ImplicitKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InitKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InKeywordRecommenderTests.cs (5)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script, 410await VerifyAbsenceAsync(SourceCodeKind.Script, @"
Recommendations\InterfaceKeywordRecommenderTests.cs (8)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 160await VerifyAbsenceAsync(SourceCodeKind.Regular, 168await VerifyAbsenceAsync(SourceCodeKind.Script, 176await VerifyAbsenceAsync(SourceCodeKind.Regular, 184await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\InternalKeywordRecommenderTests.cs (8)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 160await VerifyAbsenceAsync(SourceCodeKind.Regular, 168await VerifyAbsenceAsync(SourceCodeKind.Script, 176await VerifyAbsenceAsync(SourceCodeKind.Regular, 184await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IntKeywordRecommenderTests.cs (7)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script, 50await VerifyKeywordAsync(SourceCodeKind.Script, 57await VerifyKeywordAsync(SourceCodeKind.Script, 714await VerifyKeywordAsync(SourceCodeKind.Script, @"
Recommendations\IntoKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\IsKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\JoinKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LetKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LineKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\LockKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\LongKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\MethodKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ModuleKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NameOfKeywordRecommenderTests.cs (4)
21await VerifyKeywordAsync(SourceCodeKind.Script, 28await VerifyKeywordAsync(SourceCodeKind.Script, 36await VerifyKeywordAsync(SourceCodeKind.Script, 44await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\NamespaceKeywordRecommenderTests.cs (36)
31await VerifyAbsenceAsync(SourceCodeKind.Script, 39await VerifyAbsenceAsync(SourceCodeKind.Script, 47await VerifyAbsenceAsync(SourceCodeKind.Script, 62await VerifyKeywordAsync(SourceCodeKind.Regular, 69await VerifyAbsenceAsync(SourceCodeKind.Script, 80await VerifyKeywordAsync(SourceCodeKind.Regular, 88await VerifyAbsenceAsync(SourceCodeKind.Regular, 96await VerifyAbsenceAsync(SourceCodeKind.Regular, 105await VerifyKeywordAsync(SourceCodeKind.Regular, 116await VerifyAbsenceAsync(SourceCodeKind.Script, 124await VerifyKeywordAsync(SourceCodeKind.Regular, 132await VerifyAbsenceAsync(SourceCodeKind.Script, 140await VerifyAbsenceAsync(SourceCodeKind.Regular, 149await VerifyKeywordAsync(SourceCodeKind.Regular, 160await VerifyKeywordAsync(SourceCodeKind.Regular, 168await VerifyKeywordAsync(SourceCodeKind.Regular, 176await VerifyAbsenceAsync(SourceCodeKind.Script, 184await VerifyAbsenceAsync(SourceCodeKind.Script, 192await VerifyKeywordAsync(SourceCodeKind.Regular, 200await VerifyAbsenceAsync(SourceCodeKind.Script, 208await VerifyKeywordAsync(SourceCodeKind.Regular, 216await VerifyAbsenceAsync(SourceCodeKind.Script, 224await VerifyKeywordAsync(SourceCodeKind.Regular, 232await VerifyAbsenceAsync(SourceCodeKind.Script, 240await VerifyKeywordAsync(SourceCodeKind.Regular, 248await VerifyAbsenceAsync(SourceCodeKind.Script, 273await VerifyKeywordAsync(SourceCodeKind.Regular, 281await VerifyAbsenceAsync(SourceCodeKind.Script, 296await VerifyKeywordAsync(SourceCodeKind.Regular, 305await VerifyAbsenceAsync(SourceCodeKind.Script, 322await VerifyKeywordAsync(SourceCodeKind.Regular, 331await VerifyAbsenceAsync(SourceCodeKind.Script, 397await VerifyKeywordAsync(SourceCodeKind.Regular, 405await VerifyAbsenceAsync(SourceCodeKind.Script, 430await VerifyKeywordAsync(SourceCodeKind.Regular, 443await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NewKeywordRecommenderTests.cs (18)
745await VerifyAbsenceAsync(SourceCodeKind.Regular, 753await VerifyAbsenceAsync(SourceCodeKind.Script, 761await VerifyAbsenceAsync(SourceCodeKind.Regular, 769await VerifyAbsenceAsync(SourceCodeKind.Script, 784await VerifyKeywordAsync(SourceCodeKind.Regular, @"[goo] 792await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo] 839=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 843=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 847=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 851=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 855=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static internal $$"); 859=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static internal $$"); 863=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal static $$"); 867=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal static $$"); 880await VerifyAbsenceAsync(SourceCodeKind.Regular, 887await VerifyKeywordAsync(SourceCodeKind.Script, 897=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 901=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\NotnullKeywordRecommenderTests.cs (1)
28await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NullableKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NullKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ObjectKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\OnKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OperatorKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OrderByKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OutKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\OverrideKeywordRecommenderTests.cs (9)
19await VerifyAbsenceAsync(SourceCodeKind.Script, 26await VerifyAbsenceAsync(SourceCodeKind.Script, 34await VerifyAbsenceAsync(SourceCodeKind.Script, 42await VerifyAbsenceAsync(SourceCodeKind.Script, 70=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 153await VerifyAbsenceAsync(SourceCodeKind.Regular, 161await VerifyAbsenceAsync(SourceCodeKind.Script, 169await VerifyAbsenceAsync(SourceCodeKind.Regular, 177await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ParamKeywordRecommenderTests.cs (4)
26await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script, 49await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ParamsKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PartialKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 169await VerifyAbsenceAsync(SourceCodeKind.Regular, 177await VerifyAbsenceAsync(SourceCodeKind.Script, 185await VerifyAbsenceAsync(SourceCodeKind.Regular, 193await VerifyAbsenceAsync(SourceCodeKind.Script, 352await VerifyAbsenceAsync(SourceCodeKind.Regular, 362await VerifyAbsenceAsync(SourceCodeKind.Regular, 372await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PragmaKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PrivateKeywordRecommenderTests.cs (25)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 69=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 74await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo; 81await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo; 88await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo; 95await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo; 102await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo; 109await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo; 116await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {} 123await VerifyAbsenceAsync(SourceCodeKind.Regular, 131await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {} 138await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo(); 172await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$ 179await VerifyAbsenceAsync(SourceCodeKind.Script, @"$$ 186await VerifyAbsenceAsync(SourceCodeKind.Regular, 194await VerifyAbsenceAsync(SourceCodeKind.Script, 202await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo] 209await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo] 216await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo] 223await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo] 323=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 327=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PropertyKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ProtectedKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\PublicKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 160await VerifyAbsenceAsync(SourceCodeKind.Regular, 168await VerifyAbsenceAsync(SourceCodeKind.Script, 176await VerifyAbsenceAsync(SourceCodeKind.Regular, 184await VerifyAbsenceAsync(SourceCodeKind.Script, 318await VerifyAbsenceAsync(SourceCodeKind.Regular, 328await VerifyAbsenceAsync(SourceCodeKind.Regular, 338await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReadOnlyKeywordRecommenderTests.cs (5)
166await VerifyAbsenceAsync(SourceCodeKind.Regular, 174await VerifyAbsenceAsync(SourceCodeKind.Script, 182await VerifyAbsenceAsync(SourceCodeKind.Regular, 190await VerifyAbsenceAsync(SourceCodeKind.Script, 274=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$");
Recommendations\RecommenderTests.cs (6)
169protected async Task VerifyKeywordAsync(SourceCodeKind kind, string text) 173case SourceCodeKind.Regular: 177case SourceCodeKind.Script: 190protected async Task VerifyAbsenceAsync(SourceCodeKind kind, string text) 194case SourceCodeKind.Regular: 197case SourceCodeKind.Script:
Recommendations\RecordKeywordRecommenderTests.cs (12)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script, 180await VerifyAbsenceAsync(SourceCodeKind.Regular, 188await VerifyAbsenceAsync(SourceCodeKind.Script, 196await VerifyAbsenceAsync(SourceCodeKind.Regular, 204await VerifyAbsenceAsync(SourceCodeKind.Script, 312await VerifyKeywordAsync(SourceCodeKind.Regular, 398await VerifyAbsenceAsync(SourceCodeKind.Regular, 408await VerifyAbsenceAsync(SourceCodeKind.Regular, 418await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReferenceKeywordRecommenderTests.cs (9)
70await VerifyAbsenceAsync(SourceCodeKind.Regular, 77await VerifyKeywordAsync(SourceCodeKind.Script, 84await VerifyAbsenceAsync(SourceCodeKind.Regular, 91await VerifyKeywordAsync(SourceCodeKind.Script, 98await VerifyKeywordAsync(SourceCodeKind.Script, 107await VerifyKeywordAsync(SourceCodeKind.Script, 115await VerifyKeywordAsync(SourceCodeKind.Script, 123await VerifyAbsenceAsync(SourceCodeKind.Script, 131await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RefKeywordRecommenderTests.cs (13)
545=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$"); 771[InlineData(SourceCodeKind.Regular, true)] 772[InlineData(SourceCodeKind.Regular, false)] 773[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")] 774[InlineData(SourceCodeKind.Script, false)] 775public async Task TestInConditionalExpressionTrueBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement) 781options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions); 785[InlineData(SourceCodeKind.Regular, true)] 786[InlineData(SourceCodeKind.Regular, false)] 787[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")] 788[InlineData(SourceCodeKind.Script, false)] 789public async Task TestInConditionalExpressionFalseBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement) 796options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
Recommendations\RegionKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RemoveKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\RestoreKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ReturnKeywordRecommenderTests.cs (10)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Regular, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Regular, 48await VerifyAbsenceAsync(SourceCodeKind.Script, 56await VerifyKeywordAsync(SourceCodeKind.Regular, 64await VerifyAbsenceAsync(SourceCodeKind.Script, 72await VerifyKeywordAsync(SourceCodeKind.Regular, 253await VerifyAbsenceAsync(SourceCodeKind.Regular, 260await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SByteKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ScopedKeywordRecommenderTests.cs (4)
31await VerifyKeywordAsync(SourceCodeKind.Script, 38await VerifyKeywordAsync(SourceCodeKind.Script, 46await VerifyKeywordAsync(SourceCodeKind.Script, 54await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SealedKeywordRecommenderTests.cs (9)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Script, 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 203await VerifyAbsenceAsync(SourceCodeKind.Script, 281await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\SelectKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\SetKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ShortKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\SizeOfKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StackAllocKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StaticKeywordRecommenderTests.cs (9)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Script, 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 203await VerifyAbsenceAsync(SourceCodeKind.Script, 282await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\StringKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StructKeywordRecommenderTests.cs (18)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Regular, 195await VerifyKeywordAsync(SourceCodeKind.Regular, 202await VerifyKeywordAsync(SourceCodeKind.Regular, 209await VerifyKeywordAsync(SourceCodeKind.Regular, 216await VerifyKeywordAsync(SourceCodeKind.Regular, 223await VerifyKeywordAsync(SourceCodeKind.Regular, 230await VerifyKeywordAsync(SourceCodeKind.Regular, 237await VerifyAbsenceAsync(SourceCodeKind.Regular, 244await VerifyAbsenceAsync(SourceCodeKind.Regular, 251await VerifyAbsenceAsync(SourceCodeKind.Script, 259await VerifyAbsenceAsync(SourceCodeKind.Script, 340await VerifyKeywordAsync(SourceCodeKind.Regular, 361await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\SwitchKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ThisKeywordRecommenderTests.cs (4)
19await VerifyAbsenceAsync(SourceCodeKind.Script, 26await VerifyAbsenceAsync(SourceCodeKind.Script, 34await VerifyAbsenceAsync(SourceCodeKind.Script, 42await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\ThrowKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TrueKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TryKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TypeKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\TypeOfKeywordRecommenderTests.cs (4)
22await VerifyKeywordAsync(SourceCodeKind.Script, 29await VerifyKeywordAsync(SourceCodeKind.Script, 37await VerifyKeywordAsync(SourceCodeKind.Script, 45await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\TypeVarKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UIntKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\ULongKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UncheckedKeywordRecommenderTests.cs (4)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UndefKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UnmanagedKeywordRecommenderTests.cs (1)
19await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\UnsafeKeywordRecommenderTests.cs (9)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 179await VerifyAbsenceAsync(SourceCodeKind.Regular, 187await VerifyAbsenceAsync(SourceCodeKind.Script, 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 203await VerifyAbsenceAsync(SourceCodeKind.Script, 298await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\UShortKeywordRecommenderTests.cs (4)
19await VerifyKeywordAsync(SourceCodeKind.Script, 26await VerifyKeywordAsync(SourceCodeKind.Script, 34await VerifyKeywordAsync(SourceCodeKind.Script, 42await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\UsingKeywordRecommenderTests.cs (6)
40await VerifyKeywordAsync(SourceCodeKind.Script, 48await VerifyKeywordAsync(SourceCodeKind.Script, 249await VerifyAbsenceAsync(SourceCodeKind.Regular, 257await VerifyAbsenceAsync(SourceCodeKind.Script, 265await VerifyAbsenceAsync(SourceCodeKind.Regular, 273await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\VarKeywordRecommenderTests.cs (4)
29await VerifyKeywordAsync(SourceCodeKind.Script, 36await VerifyKeywordAsync(SourceCodeKind.Script, 44await VerifyKeywordAsync(SourceCodeKind.Script, 52await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\VirtualKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\VoidKeywordRecommenderTests.cs (14)
33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 171await VerifyAbsenceAsync(SourceCodeKind.Regular, 179await VerifyAbsenceAsync(SourceCodeKind.Script, 187await VerifyAbsenceAsync(SourceCodeKind.Regular, 195await VerifyAbsenceAsync(SourceCodeKind.Script, 280=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 284=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 296=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 300=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 313await VerifyAbsenceAsync(SourceCodeKind.Regular, 320await VerifyKeywordAsync(SourceCodeKind.Script, 373=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 377=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\VolatileKeywordRecommenderTests.cs (32)
18await VerifyKeywordAsync(SourceCodeKind.Script, 25await VerifyKeywordAsync(SourceCodeKind.Script, 33await VerifyKeywordAsync(SourceCodeKind.Script, 41await VerifyKeywordAsync(SourceCodeKind.Script, 69=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 74await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo; 81await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo; 88await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo; 95await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo; 102await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo; 109await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo; 116await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {} 123await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {} 130await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo(); 164await VerifyAbsenceAsync(SourceCodeKind.Regular, 172await VerifyAbsenceAsync(SourceCodeKind.Script, 180await VerifyAbsenceAsync(SourceCodeKind.Regular, 188await VerifyAbsenceAsync(SourceCodeKind.Script, 196await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo] 203await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo] 210await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo] 217await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo] 270=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 274=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$"); 286=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 290=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$"); 303await VerifyAbsenceAsync(SourceCodeKind.Regular, 310await VerifyKeywordAsync(SourceCodeKind.Script, 351=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 355=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$"); 367=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$"); 371=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\WarningKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WarningsKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WhereKeywordRecommenderTests.cs (4)
18await VerifyAbsenceAsync(SourceCodeKind.Script, 25await VerifyAbsenceAsync(SourceCodeKind.Script, 33await VerifyAbsenceAsync(SourceCodeKind.Script, 41await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\WhileKeywordRecommenderTests.cs (4)
17await VerifyKeywordAsync(SourceCodeKind.Script, 24await VerifyKeywordAsync(SourceCodeKind.Script, 32await VerifyKeywordAsync(SourceCodeKind.Script, 40await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\WithKeywordRecommenderTests.cs (4)
25await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script, 48await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\YieldKeywordRecommenderTests.cs (4)
17await VerifyAbsenceAsync(SourceCodeKind.Script, 24await VerifyAbsenceAsync(SourceCodeKind.Script, 32await VerifyAbsenceAsync(SourceCodeKind.Script, 40await VerifyAbsenceAsync(SourceCodeKind.Script,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
354kind: SourceCodeKind.Regular);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (16)
Attributes\AttributeTests_Dynamic.cs (15)
1296[InlineData(SourceCodeKind.Regular)] 1297[InlineData(SourceCodeKind.Script)] 1298public void TestNoCS1980WhenNotInContextWhichNeedsDynamicAttribute(SourceCodeKind sourceCodeKind) 1306[InlineData(SourceCodeKind.Regular)] 1307[InlineData(SourceCodeKind.Script)] 1308public void TestNoCS1980WhenNotInContextWhichNeedsDynamicAttribute_Errors(SourceCodeKind sourceCodeKind) 1344[InlineData(SourceCodeKind.Regular)] 1345[InlineData(SourceCodeKind.Script)] 1346public void TestDynamicAttributeInAliasContext1(SourceCodeKind sourceCodeKind) 1358[InlineData(SourceCodeKind.Regular)] 1359[InlineData(SourceCodeKind.Script)] 1360public void TestDynamicAttributeInAliasContext2(SourceCodeKind sourceCodeKind) 1372[InlineData(SourceCodeKind.Regular)] 1373[InlineData(SourceCodeKind.Script)] 1374public void TestDynamicAttributeInAliasContext_Errors(SourceCodeKind sourceCodeKind)
Diagnostics\GetDiagnosticsTests.cs (1)
336var compilation = CreateCompilationWithMscorlib45(string.Empty, parseOptions: new CSharpParseOptions().WithKind(SourceCodeKind.Interactive));
Microsoft.CodeAnalysis.CSharp.Features (3)
ExtractMethod\CSharpSelectionValidator.cs (2)
106if (localFunction && options is { Kind: SourceCodeKind.Script }) 112if (!localFunction && options is { Kind: SourceCodeKind.Regular })
GenerateType\CSharpGenerateTypeService.cs (1)
259document.Document.SourceCodeKind == 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)
36var options = ScriptOptions.Default.WithParseOptions(new VisualBasicParseOptions(kind: SourceCodeKind.Script, languageVersion: VisualBasic.LanguageVersion.Latest));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\DelegateTypeTests.cs (2)
7536var comp = CreateCompilation(source, parseOptions: TestOptions.Regular9.WithKind(SourceCodeKind.Script)); 7548comp = CreateCompilation(source, parseOptions: TestOptions.Regular10.WithKind(SourceCodeKind.Script));
Semantics\InterpolationTests.cs (2)
1159kind: SourceCodeKind.Regular 1370kind: 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); 77Assert.Equal(SourceCodeKind.Regular, options.Kind); 78Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 82options = new CSharpParseOptions(kind: SourceCodeKind.Regular); 83Assert.Equal(SourceCodeKind.Regular, options.Kind); 84Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 88options = new CSharpParseOptions(kind: SourceCodeKind.Script); 89Assert.Equal(SourceCodeKind.Script, options.Kind); 90Assert.Equal(SourceCodeKind.Script, options.SpecifiedKind); 95options = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 96Assert.Equal(SourceCodeKind.Script, options.Kind); 97Assert.Equal(SourceCodeKind.Interactive, options.SpecifiedKind); 104options = new CSharpParseOptions(kind: (SourceCodeKind)int.MinValue); 105Assert.Equal(SourceCodeKind.Regular, options.Kind); 106Assert.Equal((SourceCodeKind)int.MinValue, options.SpecifiedKind); 116var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 117var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script); 123options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 124options2 = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 133var options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 134var options2 = new CSharpParseOptions(kind: SourceCodeKind.Script); 140options1 = new CSharpParseOptions(kind: SourceCodeKind.Script); 141options2 = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 151var options = new CSharpParseOptions(kind: SourceCodeKind.Interactive); 193var options = new CSharpParseOptions().WithKind(SourceCodeKind.Interactive);
Parsing\MemberDeclarationParsingTests.cs (1)
2262bool 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)
18public static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.Parse); 19public static readonly CSharpParseOptions Script = Regular.WithKind(SourceCodeKind.Script); 54new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None, languageVersion: LanguageVersion.Preview).WithFeatures(s_experimentalFeatures);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CSharpSyntaxContext.cs (1)
405=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
631if (((CSharpParseOptions)container.SyntaxTree.Options).Kind == SourceCodeKind.Script)
Serialization\CSharpOptionsSerializationService.cs (1)
69ReadParseOptionsFrom(reader, out var kind, out var documentationMode, out var features, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (2)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (2)
266=> parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Regular)); 269=> parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Script) ?? GetScriptOptions());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (72)
Completion\AbstractArgumentProviderTests`1.cs (1)
61var document = workspaceFixture.Target.UpdateDocument(code, SourceCodeKind.Regular);
Completion\AbstractCompletionProviderTests.cs (31)
114=> document.SourceCodeKind == SourceCodeKind.Regular ? ImmutableHashSet<string>.Empty : ImmutableHashSet.Create(PredefinedInteractiveTextViewRoles.InteractiveTextViewRole); 122SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 240SourceCodeKind? sourceCodeKind, bool usePreviousCharAsTrigger, bool checkForAbsence, 245foreach (var sourceKind in sourceCodeKind.HasValue ? new[] { sourceCodeKind.Value } : new[] { SourceCodeKind.Regular, SourceCodeKind.Script }) 280protected async Task VerifyCustomCommitProviderAsync(string markupBeforeCommit, string itemToCommit, string expectedCodeAfterCommit, SourceCodeKind? sourceCodeKind = null, char? commitChar = null) 294await VerifyCustomCommitProviderWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, SourceCodeKind.Regular, commitChar); 295await VerifyCustomCommitProviderWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, SourceCodeKind.Script, commitChar); 305SourceCodeKind? sourceCodeKind = null) 321await VerifyProviderCommitWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, commitChar, SourceCodeKind.Regular); 322await VerifyProviderCommitWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, commitChar, SourceCodeKind.Script); 334SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, 351SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, 365string markup, SourceCodeKind? sourceCodeKind = null, bool usePreviousCharAsTrigger = false, 378string markup, SourceCodeKind? sourceCodeKind = null, 404SourceCodeKind sourceCodeKind, 443protected virtual async Task VerifyCustomCommitProviderWorkerAsync(string codeBeforeCommit, int position, string itemToCommit, string expectedCodeAfterCommit, SourceCodeKind sourceCodeKind, char? commitChar = null) 565char? commitChar, SourceCodeKind sourceCodeKind) 920SourceCodeKind sourceCodeKind, bool checkForAbsence, 938SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 953SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 978SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 995SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 1010SourceCodeKind sourceCodeKind, bool checkForAbsence, int? glyph, 1027SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 1038SourceCodeKind sourceCodeKind, 1087protected async Task VerifyCommitCharactersAsync(string initialMarkup, string textTypedSoFar, char[] validChars, char[] invalidChars = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular) 1121string markup, SourceCodeKind sourceCodeKind, bool usePreviousCharAsTrigger = false)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (4)
26protected async Task AssertNavigatedAsync(string code, bool next, SourceCodeKind? sourceCodeKind = null) 30: new[] { SourceCodeKind.Regular, SourceCodeKind.Script }; 32foreach (var kind in kinds)
RefactoringHelpers\RefactoringHelpersTestBase.cs (1)
107var document = workspaceFixture.Target.UpdateDocument(text, SourceCodeKind.Regular);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (8)
55SourceCodeKind? sourceCodeKind = null, 66await TestSignatureHelpWorkerAsync(markup, SourceCodeKind.Regular, experimental, expectedOrderedItemsOrNull, usePreviousCharAsTrigger); 67await TestSignatureHelpWorkerAsync(markup, SourceCodeKind.Script, experimental, expectedOrderedItemsOrNull, usePreviousCharAsTrigger); 73SourceCodeKind sourceCodeKind, 147protected virtual async Task VerifyCurrentParameterNameAsync(string markup, string expectedParameterName, SourceCodeKind? sourceCodeKind = null) 157await VerifyCurrentParameterNameWorkerAsync(markup, expectedParameterName, SourceCodeKind.Regular); 158await VerifyCurrentParameterNameWorkerAsync(markup, expectedParameterName, SourceCodeKind.Script); 168private async Task VerifyCurrentParameterNameWorkerAsync(string markup, string expectedParameterName, SourceCodeKind sourceCodeKind)
TypeInferrer\TypeInferrerTestBase.cs (2)
52SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
Utilities\Options.cs (2)
13internal static readonly CSharpParseOptions Script = new CSharpParseOptions(kind: SourceCodeKind.Script); 14internal static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular);
Workspaces\CSharpTestWorkspaceFixture.cs (1)
21parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Regular),
Workspaces\TestHostDocument.cs (5)
85public SourceCodeKind SourceCodeKind { get; } 118SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 163SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspace.cs (1)
243public new void OnDocumentSourceCodeKindChanged(DocumentId documentId, SourceCodeKind sourceCodeKind)
Workspaces\TestWorkspace_Create.cs (2)
164return parseOptions.Kind == SourceCodeKind.Regular 170return parseOptions.Kind == SourceCodeKind.Regular
Workspaces\TestWorkspace_XmlConsumption.cs (12)
232var document = new TestHostDocument(exportProvider, languageServices, code, submissionName, submissionName, cursorPosition, spans, SourceCodeKind.Script); 258var parseOptions = syntaxFactory.GetDefaultParseOptions().WithKind(SourceCodeKind.Script); 782var codeKind = SourceCodeKind.Regular; 787? SourceCodeKind.Regular 788: (SourceCodeKind)Enum.Parse(typeof(SourceCodeKind), attr.Value); 851var codeKind = SourceCodeKind.Regular; 856? SourceCodeKind.Regular 857: (SourceCodeKind)Enum.Parse(typeof(SourceCodeKind), attr.Value);
Workspaces\TestWorkspaceFixture.cs (1)
81public Document UpdateDocument(string text, SourceCodeKind sourceCodeKind, bool cleanBeforeUpdate = true)
Workspaces\VisualBasicTestWorkspaceFixture.cs (1)
25parseOptions: new VisualBasicParseOptions(kind: SourceCodeKind.Regular),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
400sourceCodeKind: SourceCodeKind.Regular,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
VS\IFSharpWorkspaceProjectContextFactory.cs (2)
38void AddSourceFile(string path, SourceCodeKind kind); 193public void AddSourceFile(string path, SourceCodeKind kind)
Microsoft.CodeAnalysis.ExternalAccess.Razor (6)
IRazorLanguageServerFactory.cs (2)
20SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
RazorDynamicFileInfo.cs (2)
17public RazorDynamicFileInfo(string filePath, SourceCodeKind sourceCodeKind, TextLoader textLoader, IRazorDocumentServiceProvider documentServiceProvider) 33public SourceCodeKind SourceCodeKind { get; }
RazorLanguageServerFactoryWrapper.cs (2)
51SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Features (8)
ExtractMethod\Extensions.cs (1)
101return node.SyntaxTree.Options.Kind != SourceCodeKind.Regular;
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
339SourceCodeKind.Regular, 350SourceCodeKind sourceCodeKind,
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
298if (Document.Document.SourceCodeKind != SourceCodeKind.Regular)
Workspace\MiscellaneousFileUtilities.cs (4)
41parseOptions = parseOptions.WithKind(SourceCodeKind.Script); 48var sourceCodeKind = parseOptions?.Kind ?? SourceCodeKind.Regular; 71hasAllInformation: sourceCodeKind == SourceCodeKind.Script),
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
160sourceCodeKind: SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
DeterministicKeyBuilderTests.cs (3)
417SourceCodeKind sourceCodeKind, 425if (sourceCodeKind == SourceCodeKind.Interactive) 427sourceCodeKind = SourceCodeKind.Script;
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\CompilationExtensions.cs (1)
362if (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)
37Return _tree.Options.Kind = SourceCodeKind.Script 156If node.Kind <> SyntaxKind.CompilationUnit OrElse _tree.Options.Kind = SourceCodeKind.Regular Then
CommandLine\VisualBasicCommandLineParser.vb (2)
1398kind:=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)
75Return _scanner.Options.Kind = SourceCodeKind.Script
Parser\ParseStatement.vb (1)
1867If 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)
88Return 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.EditorFeatures.UnitTests (57)
Completion\CompletionProviders\AbstractVisualBasicCompletionProviderTests.vb (7)
29sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, 43sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, 49If sourceCodeKind <> SourceCodeKind.Regular Then 78Protected Overrides Async Function VerifyCustomCommitProviderWorkerAsync(codeBeforeCommit As String, position As Integer, itemToCommit As String, expectedCodeAfterCommit As String, sourceCodeKind As SourceCodeKind, Optional commitChar As Char? = Nothing) As Task 81If sourceCodeKind <> Microsoft.CodeAnalysis.SourceCodeKind.Regular Then 113initialMarkup As String, textTypedSoFar As String, expected As Boolean, Optional sourceCodeKind As SourceCodeKind = SourceCodeKind.Regular) As Task
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.vb (2)
19sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean, 26If sourceCodeKind <> SourceCodeKind.Regular Then
Completion\CompletionProviders\OverrideCompletionProviderTests.vb (2)
568Await BaseVerifyWorkerAsync(code, position, "[Class]()", "Sub CBase.Class()", SourceCodeKind.Regular, False, False, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing) 589SourceCodeKind.Regular, False, False, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Completion\CompletionProviders\PartialTypeCompletionProviderTests.vb (7)
67Await VerifyProviderCommitAsync(text.Value, "C(Of Bar)", expected.Value, "("c, SourceCodeKind.Regular) 101Await VerifyProviderCommitAsync(text.Value, "C(Of Bar)", expected.Value, Nothing, SourceCodeKind.Regular) 116Await VerifyProviderCommitAsync(text.Value, "C(Of T)", expected.Value, " "c, SourceCodeKind.Regular) 277Await VerifyProviderCommitAsync(text.Value, "Class", expected.Value, Nothing, SourceCodeKind.Regular) 292Await VerifyProviderCommitAsync(text.Value, "Class(Of T)", expected.Value, Nothing, SourceCodeKind.Regular) 307Await VerifyProviderCommitAsync(text.Value, "Class(Of T)", expected.Value, "("c, SourceCodeKind.Regular) 322Await VerifyProviderCommitAsync(text.Value, "G(Of Out T)", expected.Value, Nothing, SourceCodeKind.Regular)
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.vb (2)
366Dim document1 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular) 383Dim document2 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular, cleanBeforeUpdate:=False)
Completion\CompletionProviders\SymbolCompletionProviderTests.vb (11)
889Await VerifyItemExistsAsync(<text>#$$</text>.Value, "#R", sourceCodeKind:=SourceCodeKind.Script) 894Await VerifyItemExistsAsync(<text>#r "$$"</text>.Value, "System.dll", sourceCodeKind:=SourceCodeKind.Script) 1257</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1265</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1271</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1276</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1287</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1295</Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1304]]></Text>.Value, "Console", sourceCodeKind:=SourceCodeKind.Script) 1367sourceCodeKind:=SourceCodeKind.Regular, checkForAbsence:=False, 2427Await VerifyItemIsAbsentAsync("MyBase.$$", "ToString", sourceCodeKind:=SourceCodeKind.Script)
Completion\CompletionProviders\TypeImportCompletionProviderTests.vb (6)
154<InlineData(SourceCodeKind.Regular)> 155<InlineData(SourceCodeKind.Script)> 157Public Async Function CommitTypeInImportAliasContextShouldUseFullyQualifiedName(kind As SourceCodeKind) As Task 173<InlineData(SourceCodeKind.Regular)> 174<InlineData(SourceCodeKind.Script)> 176Public Async Function CommitGenericTypeParameterInImportAliasContextShouldUseFullyQualifiedName(kind As SourceCodeKind) As Task
Completion\CompletionProviders\XmlDocCommentCompletionProviderTests.vb (1)
23sourceCodeKind As SourceCodeKind, usePreviousCharAsTrigger As Boolean,
Debugging\LocationInfoGetterTests.vb (3)
411</text>.NormalizedValue, Nothing, 0, New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 419</text>.NormalizedValue, "F1(x As Integer) As Integer", 1, New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 427</text>.NormalizedValue, Nothing, 0, New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
Diagnostics\GenerateVariable\GenerateVariableTests.vb (2)
1353parseOptions:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 1363parseOptions:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script),
GoToAdjacentMember\VisualBasicGoToAdjacentMemberTests.vb (2)
433Await AssertNavigatedAsync(code, next:=True, sourceCodeKind:=SourceCodeKind.Script) 445Await AssertNavigatedAsync(code, next:=False, sourceCodeKind:=SourceCodeKind.Script)
Recommendations\RecommendationTestHelpers.vb (7)
17Private Function GetRecommendedKeywords(source As String, position As Integer, kind As SourceCodeKind) As IEnumerable(Of RecommendedKeyword) 43Private Function GetRecommendedKeywordStrings(source As String, position As Integer, kind As SourceCodeKind) As IEnumerable(Of String) 87Private Sub VerifyRecommendationsContainNothingTyped(source As String, kind As SourceCodeKind, priority As Integer?, ParamArray recommendations As String()) 109Private Sub VerifyRecommendationsContainPartiallyTyped(source As String, kind As SourceCodeKind, priority As Integer?, ParamArray recommendations As String()) 153Private Function GetSourceCodeKind(testSource As XElement) As SourceCodeKind 154Return If(testSource.@Script = "True", SourceCodeKind.Script, SourceCodeKind.Regular)
SignatureHelp\AbstractVisualBasicSignatureHelpProviderTests.vb (4)
14Protected Overrides Function TestAsync(markupWithPositionAndOptSpan As String, Optional expectedOrderedItemsOrNull As IEnumerable(Of SignatureHelpTestItem) = Nothing, Optional usePreviousCharAsTrigger As Boolean = False, Optional sourceCodeKind As Microsoft.CodeAnalysis.SourceCodeKind? = Nothing, Optional experimental As Boolean = False) As Threading.Tasks.Task 18Return MyBase.TestAsync(markupWithPositionAndOptSpan, expectedOrderedItemsOrNull, usePreviousCharAsTrigger, Microsoft.CodeAnalysis.SourceCodeKind.Regular, experimental) 22Protected Overrides Function VerifyCurrentParameterNameAsync(markupWithPosition As String, expectedParameterName As String, Optional sourceCodeKind As Microsoft.CodeAnalysis.SourceCodeKind? = Nothing) As Threading.Tasks.Task 26Return MyBase.VerifyCurrentParameterNameAsync(markupWithPosition, expectedParameterName, Microsoft.CodeAnalysis.SourceCodeKind.Regular)
SignatureHelp\CollectionInitializerSignatureHelpProviderTests.vb (1)
168Await TestAsync(markup, expectedOrderedItems, sourceCodeKind:=SourceCodeKind.Regular)
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 = CreateCompilationWithMscorlib45(String.Empty, parseOptions:=New VisualBasicParseOptions().WithKind(SourceCodeKind.Interactive))
Semantics\ScriptSemanticsTests.vb (8)
42Dim compilationUnit = VisualBasic.SyntaxFactory.ParseCompilationUnit(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 74syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 83syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 92syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 105syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 118syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 133Dim compilationUnit = VisualBasic.SyntaxFactory.ParseCompilationUnit("System.Console.WriteLine(1)", options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script)) 135Dim syntaxTree2 = SyntaxFactory.ParseSyntaxTree("System.Console.WriteLine(2)", options:=New VisualBasicParseOptions(kind:=SourceCodeKind.Script))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (41)
Parser\VisualBasicParseOptionsTests.vb (25)
23TestProperty(Function(old, value) old.WithKind(value), Function(opt) opt.Kind, SourceCodeKind.Script) 246Assert.Equal(SourceCodeKind.Regular, options.Kind) 247Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind) 251options = New VisualBasicParseOptions(kind:=SourceCodeKind.Regular) 252Assert.Equal(SourceCodeKind.Regular, options.Kind) 253Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind) 257options = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 258Assert.Equal(SourceCodeKind.Script, options.Kind) 259Assert.Equal(SourceCodeKind.Script, options.SpecifiedKind) 264options = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 265Assert.Equal(SourceCodeKind.Script, options.Kind) 266Assert.Equal(SourceCodeKind.Interactive, options.SpecifiedKind) 271options = New VisualBasicParseOptions(kind:=CType(Int32.MinValue, SourceCodeKind)) 272Assert.Equal(SourceCodeKind.Regular, options.Kind) 273Assert.Equal(CType(Int32.MinValue, SourceCodeKind), options.SpecifiedKind) 280Dim options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 281Dim options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 287options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 288options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 296Dim options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 297Dim options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 303options1 = New VisualBasicParseOptions(kind:=SourceCodeKind.Script) 304options2 = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 313Dim options = New VisualBasicParseOptions(kind:=SourceCodeKind.Interactive) 346Dim 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.VisualBasic.Workspaces (1)
Serialization\VisualBasicOptionsSerializationService.vb (1)
111Dim kind As SourceCodeKind
Microsoft.CodeAnalysis.Workspaces (52)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
37=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Serialization\AbstractOptionsSerializationService.cs (2)
182out SourceCodeKind kind, 189kind = (SourceCodeKind)reader.ReadInt32();
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;
Workspace\CommandLineProject.cs (3)
131sourceCodeKind: fileArg.IsScript ? SourceCodeKind.Script : SourceCodeKind.Regular, 158sourceCodeKind: SourceCodeKind.Regular,
Workspace\Host\SourceFiles\DynamicFileInfo.cs (2)
15public DynamicFileInfo(string filePath, SourceCodeKind sourceCodeKind, TextLoader textLoader, bool designTimeOnly, IDocumentServiceProvider? documentServiceProvider) 32public SourceCodeKind SourceCodeKind { get; }
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
87public DocumentId AddFile(string fullPath, SourceCodeKind sourceCodeKind, ImmutableArray<string> folders) 134SourceCodeKind sourceCodeKind,
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
685public void AddSourceFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, ImmutableArray<string> folders = default) 700SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 722public void AddAdditionalFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular) 738_analyzerConfigFiles.AddFile(fullPath, SourceCodeKind.Regular, folders: default);
Workspace\Solution\Document.cs (2)
51public SourceCodeKind SourceCodeKind => DocumentState.SourceCodeKind; 324public Document WithSourceCodeKind(SourceCodeKind kind)
Workspace\Solution\DocumentInfo.cs (11)
43public SourceCodeKind SourceCodeKind => Attributes.SourceCodeKind; 82SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 128public DocumentInfo WithSourceCodeKind(SourceCodeKind kind) 172public SourceCodeKind SourceCodeKind { get; } 194SourceCodeKind sourceCodeKind, 212Optional<SourceCodeKind> sourceCodeKind = default, 220var newSourceCodeKind = sourceCodeKind.HasValue ? sourceCodeKind.Value : SourceCodeKind; 243=> FilePath ?? (SourceCodeKind == SourceCodeKind.Regular ? Name : ""); 265var sourceCodeKind = (SourceCodeKind)reader.ReadByte();
Workspace\Solution\DocumentState.cs (3)
94public SourceCodeKind SourceCodeKind 326var originalSourceKind = this.SourceCodeKind; 392public DocumentState UpdateSourceCodeKind(SourceCodeKind kind)
Workspace\Solution\ProjectChanges.cs (1)
127/// otherwise get documents with any changes i.e. <see cref="ParseOptions"/>, <see cref="SourceCodeKind"/> and file path.
Workspace\Solution\Solution.cs (5)
989private static SourceCodeKind GetSourceCodeKind(ProjectState project) 990=> project.ParseOptions != null ? project.ParseOptions.Kind : SourceCodeKind.Regular; 1565public Solution WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind) 1570if (sourceCodeKind == SourceCodeKind.Interactive) 1572sourceCodeKind = SourceCodeKind.Script;
Workspace\Solution\SolutionState.cs (1)
1394public SolutionState WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind)
Workspace\Workspace.cs (2)
1097protected internal void OnDocumentSourceCodeKindChanged(DocumentId documentId, SourceCodeKind sourceCodeKind) 1778doc is Document sourceDoc ? sourceDoc.SourceCodeKind : SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Workspaces.MSBuild (13)
MSBuild\CSharp\CSharpProjectFile.cs (3)
21protected override SourceCodeKind GetSourceCodeKind(string documentFileName) 22=> SourceCodeKind.Regular; 24public override string GetDocumentExtension(SourceCodeKind sourceCodeKind)
MSBuild\ProjectFile\DocumentFileInfo.cs (2)
38public SourceCodeKind SourceCodeKind { get; } 40public DocumentFileInfo(string filePath, string logicalPath, bool isLinked, bool isGenerated, SourceCodeKind sourceCodeKind)
MSBuild\ProjectFile\IProjectFile.cs (1)
39string GetDocumentExtension(SourceCodeKind kind);
MSBuild\ProjectFile\ProjectFile.cs (4)
42protected abstract SourceCodeKind GetSourceCodeKind(string documentFileName); 43public abstract string GetDocumentExtension(SourceCodeKind kind); 205var sourceCodeKind = GetSourceCodeKind(filePath); 217return new DocumentFileInfo(filePath, logicalPath, isLinked, isGenerated, SourceCodeKind.Regular);
MSBuild\VisualBasic\VisualBasicProjectFile.cs (3)
21protected override SourceCodeKind GetSourceCodeKind(string documentFileName) 22=> SourceCodeKind.Regular; 24public override string GetDocumentExtension(SourceCodeKind sourceCodeKind)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
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)
Microsoft.CodeAnalysis.Workspaces.UnitTests (38)
SolutionTests\DocumentInfoTests.cs (11)
41sourceCodeKind: SourceCodeKind.Script, 47Assert.Equal(SourceCodeKind.Script, info.SourceCodeKind); 60sourceCodeKind: SourceCodeKind.Script, 66Assert.Equal(SourceCodeKind.Script, info.SourceCodeKind); 90[InlineData(SourceCodeKind.Script, null, "")] 91[InlineData(SourceCodeKind.Script, "", "")] 92[InlineData(SourceCodeKind.Script, "path", "path")] 93[InlineData(SourceCodeKind.Regular, null, "doc_name")] 94[InlineData(SourceCodeKind.Regular, "", "")] 95[InlineData(SourceCodeKind.Regular, "path", "path")] 96public void Create_FilePath(SourceCodeKind kind, string path, string expectedSyntaxTreeFilePath)
SolutionTests\SolutionTests.cs (20)
251Assert.Same(solution, solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Regular)); 253var newSolution1 = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Script); 254Assert.Equal(SourceCodeKind.Script, newSolution1.GetDocument(documentId)!.SourceCodeKind); 256Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentSourceCodeKind(documentId, (SourceCodeKind)(-1))); 258Assert.Throws<ArgumentNullException>(() => solution.WithDocumentSourceCodeKind(null!, SourceCodeKind.Script)); 259Assert.Throws<InvalidOperationException>(() => solution.WithDocumentSourceCodeKind(s_unrelatedDocumentId, SourceCodeKind.Script)); 269var newSolution = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Interactive); 270Assert.Equal(SourceCodeKind.Script, newSolution.GetDocument(documentId)!.SourceCodeKind); 1716WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 1725Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 1742WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 1757Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 1772WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 1785Assert.Equal(SourceCodeKind.Script, document.SourceCodeKind); 1801WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 1814Assert.Equal(SourceCodeKind.Script, document2.SourceCodeKind); 1830WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 1850Assert.Equal(SourceCodeKind.Script, document2.SourceCodeKind); 1861WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 3179var newOptions = tree.Options.WithKind(SourceCodeKind.Script);
WorkspaceTests\AdhocWorkspaceTests.cs (4)
539Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind); 541var changedDoc = originalDoc.WithSourceCodeKind(SourceCodeKind.Script); 542Assert.Equal(SourceCodeKind.Script, changedDoc.SourceCodeKind); 557Assert.Equal(SourceCodeKind.Script, appliedDoc.SourceCodeKind);
WorkspaceTests\WorkspaceTests.cs (3)
94Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind); 96var changedDoc = originalDoc.WithSourceCodeKind(SourceCodeKind.Script); 97Assert.Equal(SourceCodeKind.Script, changedDoc.SourceCodeKind);
Microsoft.VisualStudio.LanguageServices (8)
ExternalAccess\VSTypeScript\Api\VSTypeScriptVisualStudioProjectWrapper.cs (2)
26=> Project.AddSourceFile(fullPath, SourceCodeKind.Regular); 31return Project.AddSourceTextContainer(sourceTextContainer, fullPath, SourceCodeKind.Regular, documentServiceProvider: documentServiceProvider);
ProjectSystem\CPS\IWorkspaceProjectContext.cs (2)
58void AddSourceFile(string filePath, bool isInCurrentContext = true, IEnumerable<string> folderNames = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular);
ProjectSystem\Legacy\AbstractLegacyProject.cs (2)
174SourceCodeKind sourceCodeKind) 200SourceCodeKind sourceCodeKind)
ProjectSystem\Legacy\AbstractLegacyProject_IProjectSiteEx.cs (1)
36AddFile(filePath, linkMetadata, SourceCodeKind.Regular);
Venus\ContainedLanguage.cs (1)
109sourceCodeKind: SourceCodeKind.Regular,
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
48AddFile(filename, SourceCodeKind.Regular);
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
230return ((CSharpParseOptions)parseOptions).WithKind(SourceCodeKind.Regular)
Microsoft.VisualStudio.LanguageServices.Implementation (2)
ProjectSystem\CPS\CPSProject_IWorkspaceProjectContext.cs (2)
226public void AddSourceFile(string filePath, bool isInCurrentContext = true, IEnumerable<string>? folderNames = null, SourceCodeKind sourceCodeKind = 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)
101MyBase.AddFile(wszFileName, SourceCodeKind.Regular)
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
231document = document.WithSourceCodeKind(SourceCodeKind.Script);
StackDepthTest (1)
Program.cs (1)
77var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None);