415 references to Regular
Microsoft.CodeAnalysis (3)
SourceCodeKindExtensions.cs (3)
19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
Microsoft.CodeAnalysis.CodeStyle (4)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (3)
19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
37=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp (17)
Binder\Binder_Initializers.cs (1)
195Debug.Assert(syntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\Binder_Patterns.cs (1)
906Debug.Assert(designation.SyntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
441if (node.Parent.Kind() == SyntaxKind.CompilationUnit && syntaxTree.Options.Kind != SourceCodeKind.Regular)
CommandLine\CSharpCommandLineParser.cs (1)
1477kind: IsScriptCommandLineParser ? SourceCodeKind.Script : SourceCodeKind.Regular,
Compilation\CSharpCompilation.cs (1)
882if (this.IsSubmission && tree.Options.Kind == SourceCodeKind.Regular)
Compilation\SyntaxTreeSemanticModel.cs (2)
1299return this.SyntaxTree.Options.Kind == SourceCodeKind.Regular; 2310if (this.SyntaxTree.Options.Kind != SourceCodeKind.Regular)
CSharpParseOptions.cs (1)
53SourceCodeKind kind = SourceCodeKind.Regular,
Declarations\DeclarationTreeBuilder.cs (5)
130(node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular)); 140bool acceptSimpleProgram = node.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind == SourceCodeKind.Regular; 266Debug.Assert(_syntaxTree.Options.Kind != SourceCodeKind.Regular); 326Debug.Assert(parent.Kind() == SyntaxKind.CompilationUnit && _syntaxTree.Options.Kind != SourceCodeKind.Regular); 392if (_syntaxTree.Options.Kind != SourceCodeKind.Regular)
Parser\DirectiveParser.cs (2)
492if (Options.Kind == SourceCodeKind.Regular) 512if (Options.Kind == SourceCodeKind.Regular)
Syntax\SyntaxFactory.cs (1)
2379if (tree.Options.Kind == SourceCodeKind.Regular ||
Syntax\SyntaxFacts.cs (1)
540return IsTopLevelStatement(syntax) && syntax.SyntaxTree.Options.Kind == SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
427=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
5304new TestParameters(new CSharpParseOptions(kind: SourceCodeKind.Regular)));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (101)
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (6)
43""", SourceCodeKind.Regular)).Single(); 88""", SourceCodeKind.Regular); 249", SourceCodeKind.Regular); 277""", SourceCodeKind.Regular); 453", SourceCodeKind.Regular); 514""", SourceCodeKind.Regular);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
1171var items = await GetCompletionItemsAsync(markup, SourceCodeKind.Regular);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
812return (_fixture.UpdateDocument(text, SourceCodeKind.Regular), position);
Completion\CompletionProviders\ExtensionMethodImportCompletionProviderTests.cs (1)
1981await VerifyProviderCommitAsync(markup, "ToInt", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular);
Completion\CompletionProviders\OperatorCompletionProviderTests.cs (4)
88""", SourceCodeKind.Regular); 224""", SourceCodeKind.Regular); 301", SourceCodeKind.Regular); 451", SourceCodeKind.Regular);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (2)
836await BaseVerifyWorkerAsync(code, position, "@class()", "void Base.@class()", SourceCodeKind.Regular, false, deletedCharTrigger: null, false, null, null, null, null, null, null); 854await BaseVerifyWorkerAsync(code, position, "@class", "int Base.@class { get; set; }", SourceCodeKind.Regular, false, deletedCharTrigger: null, false, null, null, null, null, null, null);
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (13)
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);
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (2)
1512var document1 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular); 1517var document2 = workspaceFixture.UpdateDocument(code, SourceCodeKind.Regular, cleanBeforeUpdate: false);
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (43)
28[InlineData(SourceCodeKind.Regular)] 37[InlineData(SourceCodeKind.Regular)] 467await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 481await VerifyItemExistsAsync(source, "Runtime", sourceCodeKind: SourceCodeKind.Regular); 498sourceCodeKind: SourceCodeKind.Regular); 515sourceCodeKind: SourceCodeKind.Regular); 527await VerifyItemExistsAsync(source, "A", sourceCodeKind: SourceCodeKind.Regular); 540await VerifyNoItemsExistAsync(source, sourceCodeKind: SourceCodeKind.Regular); 560sourceCodeKind: SourceCodeKind.Regular); 568await VerifyItemIsAbsentAsync(source, "NS", sourceCodeKind: SourceCodeKind.Regular); 589sourceCodeKind: SourceCodeKind.Regular); 612sourceCodeKind: SourceCodeKind.Regular); 625sourceCodeKind: SourceCodeKind.Regular); 664SourceCodeKind.Regular); 672await VerifyNoItemsExistAsync(source, sourceCodeKind: SourceCodeKind.Regular); 684await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 696await VerifyItemExistsAsync(source, "B", sourceCodeKind: SourceCodeKind.Regular); 717sourceCodeKind: SourceCodeKind.Regular); 735sourceCodeKind: SourceCodeKind.Regular); 755sourceCodeKind: SourceCodeKind.Regular); 768sourceCodeKind: SourceCodeKind.Regular); 776await VerifyItemExistsAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 794sourceCodeKind: SourceCodeKind.Regular); 834SourceCodeKind.Regular); 2096await VerifyItemExistsAsync(prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 2119""", "args", sourceCodeKind: SourceCodeKind.Regular); 2131""" + prefix + "$$", "args", sourceCodeKind: SourceCodeKind.Regular); 2146""", "args", sourceCodeKind: SourceCodeKind.Regular); 2156await VerifyItemExistsAsync("call(" + prefix + "$$)", "args", sourceCodeKind: SourceCodeKind.Regular); 2161=> await VerifyItemIsAbsentAsync(@"$$", "args", sourceCodeKind: SourceCodeKind.Regular); 2170""", "args", sourceCodeKind: SourceCodeKind.Regular); 2178""", "args", sourceCodeKind: SourceCodeKind.Regular); 2182=> await VerifyItemExistsAsync(@"string first = $$", "args", sourceCodeKind: SourceCodeKind.Regular); 3197await VerifyItemExistsAsync(markup, "Q", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 3198await VerifyItemIsAbsentAsync(markup, "R", expectedDescriptionOrNull: null, sourceCodeKind: SourceCodeKind.Regular); 3837SourceCodeKind.Regular); 3854SourceCodeKind.Regular); 8496await VerifyItemExistsAsync(markup, "ForSchemaSet", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 9709await VerifyItemExistsAsync(markup, "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 9734await VerifyItemExistsAsync(markup, "Class1", displayTextSuffix: "<>", sourceCodeKind: SourceCodeKind.Regular); 11923await VerifyItemExistsAsync(markup, "Length", sourceCodeKind: SourceCodeKind.Regular); 13534await VerifyItemIsAbsentAsync(source, "System", sourceCodeKind: SourceCodeKind.Regular); 13939sourceCodeKind: SourceCodeKind.Regular);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
39SourceCodeKind.Regular, usePreviousCharAsTrigger, deletedCharTrigger, checkForAbsence,
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (15)
804[InlineData(SourceCodeKind.Regular)] 839[InlineData(SourceCodeKind.Regular)] 864[InlineData(SourceCodeKind.Regular)] 892[InlineData(SourceCodeKind.Regular)] 924[InlineData(SourceCodeKind.Regular)] 1063[InlineData(SourceCodeKind.Regular)] 1122[InlineData(SourceCodeKind.Regular)] 1181[InlineData(SourceCodeKind.Regular)] 1240[InlineData(SourceCodeKind.Regular)] 1304[InlineData(SourceCodeKind.Regular)] 1326[InlineData(SourceCodeKind.Regular)] 1348[InlineData(SourceCodeKind.Regular)] 1603await VerifyProviderCommitAsync(markup, "C", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1648await VerifyProviderCommitAsync(markup, "C", expected, commitChar: commitChar, sourceCodeKind: SourceCodeKind.Regular); 1651[InlineData(SourceCodeKind.Regular)]
Completion\CompletionProviders\XmlDocumentationCommentCompletionProviderTests.cs (2)
513""", "args", sourceCodeKind: SourceCodeKind.Regular); 539""", "str", sourceCodeKind: SourceCodeKind.Regular);
Formatting\RazorLineFormattingOptionsTests.cs (1)
61sourceCodeKind: SourceCodeKind.Regular,
SignatureHelp\GenericNamePartiallyWrittenSignatureHelpProviderTests.cs (2)
145await TestAsync(markup, expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular); 337await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\GenericNameSignatureHelpProviderTests.cs (1)
643await TestAsync(markup, expectedOrderedItems, usePreviousCharAsTrigger: false, sourceCodeKind: Microsoft.CodeAnalysis.SourceCodeKind.Regular);
SignatureHelp\InitializerExpressionSignatureHelpProviderTests.cs (1)
233await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.cs (4)
376await TestAsync(markup, [new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) int string.ExtensionMethod(int x)", string.Empty, string.Empty, currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular); 1664new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) void IGoo.Bar<T1, T2>()", currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular); 2673sourceCodeKind: SourceCodeKind.Regular); 2712sourceCodeKind: SourceCodeKind.Regular);
TypeInferrer\TypeInferrerTests.Delegate.cs (1)
26var document = workspaceFixture.Target.UpdateDocument(text, SourceCodeKind.Regular);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (167)
Recommendations\AbstractKeywordRecommenderTests.cs (4)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyAbsenceAsync(SourceCodeKind.Regular, 331await VerifyKeywordAsync(SourceCodeKind.Regular, 338await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\BaseKeywordRecommenderTests.cs (1)
134SourceCodeKind.Regular,
Recommendations\ClassKeywordRecommenderTests.cs (6)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyAbsenceAsync(SourceCodeKind.Regular, 355await VerifyKeywordAsync(SourceCodeKind.Regular, 409await VerifyAbsenceAsync(SourceCodeKind.Regular, 421await VerifyAbsenceAsync(SourceCodeKind.Regular, 433await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ConstKeywordRecommenderTests.cs (6)
151[InlineData(SourceCodeKind.Regular)] 163[InlineData(SourceCodeKind.Regular)] 186await VerifyKeywordAsync(SourceCodeKind.Regular, """ 260=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 278=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 297await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\DelegateKeywordRecommenderTests.cs (5)
213await VerifyAbsenceAsync(SourceCodeKind.Regular, 233await VerifyAbsenceAsync(SourceCodeKind.Regular, 353await VerifyKeywordAsync(SourceCodeKind.Regular, @"static $$"); 361await VerifyKeywordAsync(SourceCodeKind.Regular, AddInsideMethod(@$"{keyword} $$")); 368await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
Recommendations\EnumKeywordRecommenderTests.cs (2)
175await VerifyAbsenceAsync(SourceCodeKind.Regular, 195await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\EventKeywordRecommenderTests.cs (16)
76=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 81await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 99await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 117await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 135await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 144await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 153await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 195await VerifyAbsenceAsync(SourceCodeKind.Regular, 215await VerifyAbsenceAsync(SourceCodeKind.Regular, 235await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 253await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 331=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 349=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 368await VerifyAbsenceAsync(SourceCodeKind.Regular, 432=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 450=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
Recommendations\GlobalKeywordRecommenderTests.cs (1)
288await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\InterfaceKeywordRecommenderTests.cs (2)
185await VerifyAbsenceAsync(SourceCodeKind.Regular, 205await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\InternalKeywordRecommenderTests.cs (2)
185await VerifyAbsenceAsync(SourceCodeKind.Regular, 205await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\NamespaceKeywordRecommenderTests.cs (19)
68await VerifyKeywordAsync(SourceCodeKind.Regular, 86await VerifyKeywordAsync(SourceCodeKind.Regular, 96await VerifyAbsenceAsync(SourceCodeKind.Regular, 106await VerifyAbsenceAsync(SourceCodeKind.Regular, 117await VerifyKeywordAsync(SourceCodeKind.Regular, 140await VerifyKeywordAsync(SourceCodeKind.Regular, 160await VerifyAbsenceAsync(SourceCodeKind.Regular, 171await VerifyKeywordAsync(SourceCodeKind.Regular, 184await VerifyKeywordAsync(SourceCodeKind.Regular, 194await VerifyKeywordAsync(SourceCodeKind.Regular, 224await VerifyKeywordAsync(SourceCodeKind.Regular, 244await VerifyKeywordAsync(SourceCodeKind.Regular, 264await VerifyKeywordAsync(SourceCodeKind.Regular, 284await VerifyKeywordAsync(SourceCodeKind.Regular, 325await VerifyKeywordAsync(SourceCodeKind.Regular, 354await VerifyKeywordAsync(SourceCodeKind.Regular, 386await VerifyKeywordAsync(SourceCodeKind.Regular, 479await VerifyKeywordAsync(SourceCodeKind.Regular, 520await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\NewKeywordRecommenderTests.cs (9)
729await VerifyAbsenceAsync(SourceCodeKind.Regular, 749await VerifyAbsenceAsync(SourceCodeKind.Regular, 778await VerifyKeywordAsync(SourceCodeKind.Regular, """ 845=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 853=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 861=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static internal $$"); 869=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal static $$"); 886await VerifyAbsenceAsync(SourceCodeKind.Regular, 903=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
Recommendations\OverrideKeywordRecommenderTests.cs (3)
75=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 178await VerifyAbsenceAsync(SourceCodeKind.Regular, 198await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PartialKeywordRecommenderTests.cs (5)
197await VerifyAbsenceAsync(SourceCodeKind.Regular, 217await VerifyAbsenceAsync(SourceCodeKind.Regular, 402await VerifyAbsenceAsync(SourceCodeKind.Regular, 414await VerifyAbsenceAsync(SourceCodeKind.Regular, 426await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PrivateKeywordRecommenderTests.cs (13)
74=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 79await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 97await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 115await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 133await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 142await VerifyAbsenceAsync(SourceCodeKind.Regular, 152await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 161await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 203await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 221await VerifyAbsenceAsync(SourceCodeKind.Regular, 241await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 259await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 382=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
Recommendations\PublicKeywordRecommenderTests.cs (5)
186await VerifyAbsenceAsync(SourceCodeKind.Regular, 206await VerifyAbsenceAsync(SourceCodeKind.Regular, 364await VerifyAbsenceAsync(SourceCodeKind.Regular, 376await VerifyAbsenceAsync(SourceCodeKind.Regular, 388await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReadOnlyKeywordRecommenderTests.cs (3)
196await VerifyAbsenceAsync(SourceCodeKind.Regular, 216await VerifyAbsenceAsync(SourceCodeKind.Regular, 328=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$");
Recommendations\RecommenderTests.cs (2)
176case SourceCodeKind.Regular: 202case SourceCodeKind.Regular:
Recommendations\RecordKeywordRecommenderTests.cs (6)
210await VerifyAbsenceAsync(SourceCodeKind.Regular, 230await VerifyAbsenceAsync(SourceCodeKind.Regular, 368await VerifyKeywordAsync(SourceCodeKind.Regular, 454await VerifyAbsenceAsync(SourceCodeKind.Regular, 466await VerifyAbsenceAsync(SourceCodeKind.Regular, 478await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ReferenceKeywordRecommenderTests.cs (2)
75await VerifyAbsenceAsync(SourceCodeKind.Regular, 89await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\RefKeywordRecommenderTests.cs (5)
603=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$"); 855[InlineData(SourceCodeKind.Regular, true)] 856[InlineData(SourceCodeKind.Regular, false)] 870[InlineData(SourceCodeKind.Regular, true)] 871[InlineData(SourceCodeKind.Regular, false)]
Recommendations\ReturnKeywordRecommenderTests.cs (5)
25await VerifyKeywordAsync(SourceCodeKind.Regular, 42await VerifyKeywordAsync(SourceCodeKind.Regular, 62await VerifyKeywordAsync(SourceCodeKind.Regular, 82await VerifyKeywordAsync(SourceCodeKind.Regular, 287await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\SealedKeywordRecommenderTests.cs (3)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyAbsenceAsync(SourceCodeKind.Regular, 331await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\StaticKeywordRecommenderTests.cs (3)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyAbsenceAsync(SourceCodeKind.Regular, 332await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\StructKeywordRecommenderTests.cs (12)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 219await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyKeywordAsync(SourceCodeKind.Regular, 236await VerifyKeywordAsync(SourceCodeKind.Regular, 243await VerifyKeywordAsync(SourceCodeKind.Regular, 250await VerifyKeywordAsync(SourceCodeKind.Regular, 257await VerifyKeywordAsync(SourceCodeKind.Regular, 264await VerifyKeywordAsync(SourceCodeKind.Regular, 271await VerifyAbsenceAsync(SourceCodeKind.Regular, 278await VerifyAbsenceAsync(SourceCodeKind.Regular, 390await VerifyKeywordAsync(SourceCodeKind.Regular, 411await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\UnsafeKeywordRecommenderTests.cs (3)
209await VerifyAbsenceAsync(SourceCodeKind.Regular, 229await VerifyAbsenceAsync(SourceCodeKind.Regular, 348await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\UsingKeywordRecommenderTests.cs (2)
293await VerifyAbsenceAsync(SourceCodeKind.Regular, 313await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\VoidKeywordRecommenderTests.cs (6)
192await VerifyAbsenceAsync(SourceCodeKind.Regular, 212await VerifyAbsenceAsync(SourceCodeKind.Regular, 327=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 345=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 364await VerifyAbsenceAsync(SourceCodeKind.Regular, 432=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
Recommendations\VolatileKeywordRecommenderTests.cs (16)
74=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$"); 79await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 97await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 115await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 133await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 142await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 151await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 193await VerifyAbsenceAsync(SourceCodeKind.Regular, 213await VerifyAbsenceAsync(SourceCodeKind.Regular, 233await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 251await VerifyAbsenceAsync(SourceCodeKind.Regular, """ 325=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$"); 343=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$"); 362await VerifyAbsenceAsync(SourceCodeKind.Regular, 416=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$"); 434=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
354kind: SourceCodeKind.Regular);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Attributes\AttributeTests_Dynamic.cs (5)
1293[InlineData(SourceCodeKind.Regular)] 1303[InlineData(SourceCodeKind.Regular)] 1341[InlineData(SourceCodeKind.Regular)] 1355[InlineData(SourceCodeKind.Regular)] 1369[InlineData(SourceCodeKind.Regular)]
Microsoft.CodeAnalysis.CSharp.Features (2)
ExtractMethod\CSharpSelectionValidator.cs (1)
108if (!localFunction && options is { Kind: SourceCodeKind.Regular })
GenerateType\CSharpGenerateTypeService.cs (1)
235document.Document.SourceCodeKind == SourceCodeKind.Regular)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
21private static readonly CSharpParseOptions Regular = new(kind: SourceCodeKind.Regular);
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
5304new TestParameters(new CSharpParseOptions(kind: SourceCodeKind.Regular)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\InterpolationTests.cs (2)
1157kind: SourceCodeKind.Regular 1368kind: SourceCodeKind.Regular
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
LexicalAndXml\PreprocessorTests.cs (4)
82return Parse(text, SourceCodeKind.Regular, defines); 99var options = this.GetOptions(SourceCodeKind.Regular, defines); 3255var node = Parse(text, SourceCodeKind.Regular); 3278var node = Parse(text, SourceCodeKind.Regular);
Parsing\CSharpParseOptionsTests.cs (6)
78Assert.Equal(SourceCodeKind.Regular, options.Kind); 79Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 83options = new CSharpParseOptions(kind: SourceCodeKind.Regular); 84Assert.Equal(SourceCodeKind.Regular, options.Kind); 85Assert.Equal(SourceCodeKind.Regular, options.SpecifiedKind); 106Assert.Equal(SourceCodeKind.Regular, options.Kind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
TestOptions.cs (2)
19public static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.Parse); 58new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None, languageVersion: LanguageVersion.Preview).WithFeatures(s_experimentalFeatures);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
427=> IsGlobalStatementContext && SyntaxTree.Options.Kind is SourceCodeKind.Regular;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (17)
Completion\AbstractArgumentProviderTests`1.cs (1)
59var document = workspaceFixture.Target.UpdateDocument(code, SourceCodeKind.Regular);
Completion\AbstractCompletionProviderTests.cs (5)
113=> document.SourceCodeKind == SourceCodeKind.Regular ? [] : [PredefinedInteractiveTextViewRoles.InteractiveTextViewRole]; 391await VerifyCustomCommitProviderWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, SourceCodeKind.Regular, commitChar); 418await VerifyProviderCommitWorkerAsync(code, position, itemToCommit, expectedCodeAfterCommit, commitChar, SourceCodeKind.Regular); 1254SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 1312protected async Task VerifyCommitCharactersAsync(string initialMarkup, string textTypedSoFar, char[] validChars, char[] invalidChars = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
28: [SourceCodeKind.Regular, SourceCodeKind.Script];
RefactoringHelpers\RefactoringHelpersTestBase.cs (1)
106var document = workspaceFixture.Target.UpdateDocument(text, SourceCodeKind.Regular);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
63await TestSignatureHelpWorkerAsync(markup, SourceCodeKind.Regular, experimental, expectedOrderedItemsOrNull, usePreviousCharAsTrigger); 154await VerifyCurrentParameterNameWorkerAsync(markup, expectedParameterName, SourceCodeKind.Regular);
TypeInferrer\TypeInferrerTestBase.cs (1)
51SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
Workspaces\CSharpTestWorkspaceFixture.cs (1)
19parseOptions: new CSharpParseOptions(kind: SourceCodeKind.Regular),
Workspaces\EditorTestHostDocument.cs (2)
54SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 87SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\EditorTestWorkspace.cs (2)
52SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 68SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\VisualBasicTestWorkspaceFixture.cs (1)
19parseOptions: new VisualBasicParseOptions(kind: SourceCodeKind.Regular),
Microsoft.CodeAnalysis.ExternalAccess.Razor (2)
Testing\AbstractRazorLanguageServerFactoryWrapper.cs (1)
24SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Testing\RazorTestLanguageServerFactory.cs (1)
49SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Features (4)
ExtractMethod\Extensions.cs (1)
69return node.SyntaxTree.Options.Kind != SourceCodeKind.Regular;
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
333SourceCodeKind.Regular,
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
311if (Document.Document.SourceCodeKind != SourceCodeKind.Regular)
Workspace\MiscellaneousFileUtilities.cs (1)
48var sourceCodeKind = parseOptions?.Kind ?? SourceCodeKind.Regular;
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
372sourceCodeKind: SourceCodeKind.Regular,
Utils\Options.cs (1)
14internal static readonly CSharpParseOptions Regular = new CSharpParseOptions(kind: SourceCodeKind.Regular);
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\Razor\RazorDynamicFileInfoProvider.cs (2)
96SourceCodeKind.Regular, 104SourceCodeKind.Regular,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
168sourceCodeKind: SourceCodeKind.Regular,
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\AnalysisContextInfoTests.cs (1)
26var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None)
Microsoft.CodeAnalysis.VisualBasic (7)
Binding\BinderFactory.vb (1)
165If node.Kind <> SyntaxKind.CompilationUnit OrElse _tree.Options.Kind = SourceCodeKind.Regular Then
CommandLine\VisualBasicCommandLineParser.vb (1)
1417kind:=If(IsScriptCommandLineParser, SourceCodeKind.Script, SourceCodeKind.Regular),
Declarations\DeclarationTreeBuilder.vb (2)
132Debug.Assert(parent.Kind = SyntaxKind.CompilationUnit AndAlso _syntaxTree.Options.Kind <> SourceCodeKind.Regular) 175If _syntaxTree.Options.Kind <> SourceCodeKind.Regular Then
Parser\ParseStatement.vb (1)
1868If lookahead.Kind <> SyntaxKind.EndOfFileToken OrElse _scanner.Options.Kind = SourceCodeKind.Regular Then
Syntax\SyntaxFactory.vb (1)
1068If options.Kind = SourceCodeKind.Regular Then
VisualBasicParseOptions.vb (1)
38Optional kind As SourceCodeKind = SourceCodeKind.Regular,
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (6)
Parser\VisualBasicParseOptionsTests.vb (6)
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) 272Assert.Equal(SourceCodeKind.Regular, options.Kind)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
TestOptions.vb (1)
13Public Shared ReadOnly Regular As New VisualBasicParseOptions(kind:=SourceCodeKind.Regular)
Microsoft.CodeAnalysis.Workspaces (11)
src\Compilers\Core\Portable\SourceCodeKindExtensions.cs (3)
19case SourceCodeKind.Regular: 21return SourceCodeKind.Regular; 27return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
37=> syntaxTree.Options.Kind != SourceCodeKind.Regular;
Workspace\CommandLineProject.cs (1)
167sourceCodeKind: fileArg.IsScript ? SourceCodeKind.Script : SourceCodeKind.Regular,
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
830public void AddSourceFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, ImmutableArray<string> folders = default) 845SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 867public void AddAdditionalFile(string fullPath, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, ImmutableArray<string> folders = default) 883_analyzerConfigFiles.AddFile(fullPath, SourceCodeKind.Regular, folders: default);
Workspace\Solution\Solution.cs (1)
923=> project.ParseOptions != null ? project.ParseOptions.Kind : SourceCodeKind.Regular;
Workspace\Workspace.cs (1)
2051doc is Document sourceDoc ? sourceDoc.SourceCodeKind : SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
448SourceCodeKind.Regular,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (12)
TestDynamicFileInfoProviderThatProducesFiles.cs (1)
34SourceCodeKind.Regular,
WorkspaceExtensions.cs (1)
15public static DocumentId AddDocument(this Workspace workspace, ProjectId projectId, IEnumerable<string> folders, string name, SourceText initialText, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular)
Workspaces\TestHostDocument.cs (2)
95SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 132SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspace.cs (2)
38SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 54SourceCodeKind sourceCodeKind = SourceCodeKind.Regular,
Workspaces\TestWorkspace_XmlConsumption.cs (2)
617var codeKind = SourceCodeKind.Regular; 622? SourceCodeKind.Regular
Workspaces\TestWorkspace`1.cs (4)
180SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 195SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, 226return parseOptions.Kind == SourceCodeKind.Regular 232return parseOptions.Kind == SourceCodeKind.Regular
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
SolutionTests\DocumentInfoTests.cs (3)
91[InlineData(SourceCodeKind.Regular, null, "doc_name")] 92[InlineData(SourceCodeKind.Regular, "", "")] 93[InlineData(SourceCodeKind.Regular, "path", "path")]
SolutionTests\SolutionTests.cs (9)
255Assert.Same(solution, solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Regular)); 281var document2 = document1.WithSourceCodeKind(SourceCodeKind.Regular); 282Assert.Equal(SourceCodeKind.Regular, document2.DocumentState.ParseOptions?.Kind); 283Assert.Equal(SourceCodeKind.Regular, document2.SourceCodeKind); 1116sourceCodeKind: SourceCodeKind.Regular, 1135sourceCodeKind: SourceCodeKind.Regular, 1154sourceCodeKind: SourceCodeKind.Regular, 4908var document2 = document1.WithSourceCodeKind(SourceCodeKind.Regular); 4909Assert.Equal(SourceCodeKind.Regular, document2.SourceCodeKind);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
515Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind);
WorkspaceTests\WorkspaceTests.cs (1)
91Assert.Equal(SourceCodeKind.Regular, originalDoc.SourceCodeKind);
Microsoft.VisualStudio.LanguageServices (5)
ExternalAccess\VSTypeScript\Api\VSTypeScriptVisualStudioProjectWrapper.cs (2)
25=> Project.AddSourceFile(fullPath, SourceCodeKind.Regular); 30return Project.AddSourceTextContainer(sourceTextContainer, fullPath, SourceCodeKind.Regular, documentServiceProvider: documentServiceProvider);
ProjectSystem\CPS\IWorkspaceProjectContext.cs (1)
56void AddSourceFile(string filePath, bool isInCurrentContext = true, IEnumerable<string>? folderNames = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular);
ProjectSystem\Legacy\AbstractLegacyProject_IProjectSiteEx.cs (1)
36AddFile(filePath, linkMetadata, SourceCodeKind.Regular);
Venus\ContainedLanguage.cs (1)
106sourceCodeKind: SourceCodeKind.Regular,
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
49AddFile(filename, SourceCodeKind.Regular);
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
229return ((CSharpParseOptions)parseOptions).WithKind(SourceCodeKind.Regular)
Microsoft.VisualStudio.LanguageServices.UnitTests (3)
LanguageBlockTests.vb (3)
221", LanguageNames.CSharp, SourceCodeKind.Regular) 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)
StackDepthTest (1)
Program.cs (1)
77var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Regular, documentationMode: DocumentationMode.None);