93 references to FileScopedNamespaceDeclaration
Microsoft.CodeAnalysis.CSharp (20)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1036Debug.Assert(declarationSyntax.Kind() is SyntaxKind.CompilationUnit or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration);
Binder\BinderFactory.cs (1)
189case SyntaxKind.FileScopedNamespaceDeclaration:
Binder\WithExternAliasesBinder.cs (1)
91Debug.Assert(declarationSyntax.Kind() is SyntaxKind.CompilationUnit or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration);
Binder\WithExternAndUsingAliasesBinder.cs (1)
120Debug.Assert(declarationSyntax.Kind() is SyntaxKind.CompilationUnit or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration);
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
276Debug.Assert(declarationSyntax.Kind() is SyntaxKind.CompilationUnit or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration);
Compilation\CSharpSemanticModel.cs (1)
5110case SyntaxKind.FileScopedNamespaceDeclaration:
Compilation\SyntaxTreeSemanticModel.cs (2)
2304if (memberDeclaration.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration) 2335if (memberDeclaration.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration
Declarations\DeclarationKind.cs (1)
39case SyntaxKind.FileScopedNamespaceDeclaration:
Declarations\DeclarationTreeBuilder.cs (1)
129node.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration ||
Parser\LanguageParser.cs (5)
292this.ParseNamespaceBody(ref semicolon, ref body, ref initialBadNodes, SyntaxKind.FileScopedNamespaceDeclaration); 790case SyntaxKind.FileScopedNamespaceDeclaration: 2399case SyntaxKind.FileScopedNamespaceDeclaration: 2938else if (parentKind is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration || 4966parentKind is not SyntaxKind.NamespaceDeclaration and not SyntaxKind.FileScopedNamespaceDeclaration &&
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
78case SyntaxKind.FileScopedNamespaceDeclaration:
Symbols\Source\SourceMemberContainerSymbol.cs (2)
3530case SyntaxKind.FileScopedNamespaceDeclaration: 5245SyntaxKind.FileScopedNamespaceDeclaration or
Syntax\SyntaxKindFacts.cs (1)
396kind == SyntaxKind.FileScopedNamespaceDeclaration;
Syntax\SyntaxNormalizer.cs (1)
1328if (node.Parent.Kind() is SyntaxKind.GlobalStatement or SyntaxKind.FileScopedNamespaceDeclaration)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
58case SyntaxKind.FileScopedNamespaceDeclaration:
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
30=> context.RegisterSyntaxNodeAction(AnalyzeNamespace, SyntaxKind.FileScopedNamespaceDeclaration);
src\Analyzers\CSharp\Analyzers\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
37=> [SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration];
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (2)
53context.RegisterSyntaxNodeAction(AnalyzeNamespaceNode, SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration); 95t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
192case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
826case SyntaxKind.FileScopedNamespaceDeclaration:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
236SyntaxKind.FileScopedNamespaceDeclaration => CodeGenerationDestination.Namespace,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
896case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
64(i == 0 && currentUsing.IsParentKind(SyntaxKind.FileScopedNamespaceDeclaration)))
Microsoft.CodeAnalysis.CSharp.Features (11)
Completion\KeywordRecommenders\ExternKeywordRecommender.cs (1)
99token.Parent.IsKind(SyntaxKind.FileScopedNamespaceDeclaration))
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (1)
118!token.Parent.Parent.IsKind(SyntaxKind.FileScopedNamespaceDeclaration))
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (1)
104|| (token.Kind() == SyntaxKind.SemicolonToken && token.Parent.IsKind(SyntaxKind.FileScopedNamespaceDeclaration)))
EditAndContinue\SyntaxComparer.cs (2)
585case SyntaxKind.FileScopedNamespaceDeclaration: 1422case SyntaxKind.FileScopedNamespaceDeclaration:
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
58case SyntaxKind.FileScopedNamespaceDeclaration:
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
30=> context.RegisterSyntaxNodeAction(AnalyzeNamespace, SyntaxKind.FileScopedNamespaceDeclaration);
src\Analyzers\CSharp\Analyzers\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
37=> [SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration];
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (2)
53context.RegisterSyntaxNodeAction(AnalyzeNamespaceNode, SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration); 95t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration));
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
78case SyntaxKind.FileScopedNamespaceDeclaration:
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelAPITests.cs (1)
425var nsArray = tree.GetCompilationUnitRoot().DescendantNodes().Where(node => node.IsKind(SyntaxKind.FileScopedNamespaceDeclaration)).ToArray();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (34)
Parsing\CollectionExpressionParsingTests.cs (1)
1086N(SyntaxKind.FileScopedNamespaceDeclaration);
Parsing\DeclarationParsingTests.cs (3)
592Assert.Equal(SyntaxKind.FileScopedNamespaceDeclaration, file.Members[0].Kind()); 658Assert.Equal(SyntaxKind.FileScopedNamespaceDeclaration, file.Members[0].Kind()); 703Assert.Equal(SyntaxKind.FileScopedNamespaceDeclaration, file.Members[0].Kind());
Parsing\FileModifierParsingTests.cs (3)
662N(SyntaxKind.FileScopedNamespaceDeclaration); 2249N(SyntaxKind.FileScopedNamespaceDeclaration); 2314N(SyntaxKind.FileScopedNamespaceDeclaration);
Parsing\MemberDeclarationParsingTests.cs (1)
11153N(SyntaxKind.FileScopedNamespaceDeclaration);
Parsing\ParsingErrorRecoveryTests.cs (1)
7136Assert.Equal(SyntaxKind.FileScopedNamespaceDeclaration, namespaceDeclaration.Kind());
Parsing\SingleLineDeclarationParsingTests.cs (24)
174N(SyntaxKind.FileScopedNamespaceDeclaration); 202N(SyntaxKind.FileScopedNamespaceDeclaration); 227N(SyntaxKind.FileScopedNamespaceDeclaration); 257N(SyntaxKind.FileScopedNamespaceDeclaration); 290N(SyntaxKind.FileScopedNamespaceDeclaration); 318N(SyntaxKind.FileScopedNamespaceDeclaration); 343N(SyntaxKind.FileScopedNamespaceDeclaration); 366N(SyntaxKind.FileScopedNamespaceDeclaration); 374N(SyntaxKind.FileScopedNamespaceDeclaration); 408N(SyntaxKind.FileScopedNamespaceDeclaration); 435N(SyntaxKind.FileScopedNamespaceDeclaration); 480N(SyntaxKind.FileScopedNamespaceDeclaration); 512N(SyntaxKind.FileScopedNamespaceDeclaration); 535N(SyntaxKind.FileScopedNamespaceDeclaration); 574N(SyntaxKind.FileScopedNamespaceDeclaration); 597N(SyntaxKind.FileScopedNamespaceDeclaration); 634N(SyntaxKind.FileScopedNamespaceDeclaration); 657N(SyntaxKind.FileScopedNamespaceDeclaration); 689N(SyntaxKind.FileScopedNamespaceDeclaration); 711N(SyntaxKind.FileScopedNamespaceDeclaration); 742N(SyntaxKind.FileScopedNamespaceDeclaration); 772N(SyntaxKind.FileScopedNamespaceDeclaration); 795N(SyntaxKind.FileScopedNamespaceDeclaration); 829N(SyntaxKind.FileScopedNamespaceDeclaration);
Parsing\UsingDirectiveParsingTests.cs (1)
3379N(SyntaxKind.FileScopedNamespaceDeclaration);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
140case SyntaxKind.FileScopedNamespaceDeclaration:
Simplification\Simplifiers\NameSimplifier.cs (1)
567case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
192case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
826case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
236SyntaxKind.FileScopedNamespaceDeclaration => CodeGenerationDestination.Namespace,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
896case SyntaxKind.FileScopedNamespaceDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
64(i == 0 && currentUsing.IsParentKind(SyntaxKind.FileScopedNamespaceDeclaration)))
Microsoft.VisualStudio.LanguageServices.CSharp (10)
CodeModel\CSharpCodeModelService.cs (7)
106case SyntaxKind.FileScopedNamespaceDeclaration: 140case SyntaxKind.FileScopedNamespaceDeclaration: 563case SyntaxKind.FileScopedNamespaceDeclaration: 595case SyntaxKind.FileScopedNamespaceDeclaration: 829case SyntaxKind.FileScopedNamespaceDeclaration: 904case SyntaxKind.FileScopedNamespaceDeclaration: 3508case SyntaxKind.FileScopedNamespaceDeclaration:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
68case SyntaxKind.FileScopedNamespaceDeclaration: 119case SyntaxKind.FileScopedNamespaceDeclaration:
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (1)
166case SyntaxKind.FileScopedNamespaceDeclaration: