94 references to FileScopedNamespaceDeclaration
Microsoft.CodeAnalysis.CSharp (20)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1012Debug.Assert(declarationSyntax.Kind() is SyntaxKind.CompilationUnit or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration);
Binder\BinderFactory.cs (1)
175case 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)
5092case SyntaxKind.FileScopedNamespaceDeclaration:
Compilation\SyntaxTreeSemanticModel.cs (2)
2299if (memberDeclaration.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration) 2330if (memberDeclaration.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration
CSharpDeclarationComputer.cs (1)
78case SyntaxKind.FileScopedNamespaceDeclaration:
Declarations\DeclarationKind.cs (1)
39case SyntaxKind.FileScopedNamespaceDeclaration:
Declarations\DeclarationTreeBuilder.cs (1)
54node.Kind() is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration ||
Parser\LanguageParser.cs (5)
290this.ParseNamespaceBody(ref semicolon, ref body, ref initialBadNodes, SyntaxKind.FileScopedNamespaceDeclaration); 623case SyntaxKind.FileScopedNamespaceDeclaration: 2084case SyntaxKind.FileScopedNamespaceDeclaration: 2623else if (parentKind is SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration || 4702parentKind is not SyntaxKind.NamespaceDeclaration and not SyntaxKind.FileScopedNamespaceDeclaration &&
Symbols\Source\SourceMemberContainerSymbol.cs (2)
3384case SyntaxKind.FileScopedNamespaceDeclaration: 4976SyntaxKind.FileScopedNamespaceDeclaration or
Syntax\SyntaxKindFacts.cs (1)
368kind == SyntaxKind.FileScopedNamespaceDeclaration;
Syntax\SyntaxNormalizer.cs (1)
1320if (node.Parent.Kind() is SyntaxKind.GlobalStatement or SyntaxKind.FileScopedNamespaceDeclaration)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
30=> context.RegisterSyntaxNodeAction(AnalyzeNamespace, SyntaxKind.FileScopedNamespaceDeclaration);
CSharpAccessibilityFacts.cs (1)
192case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpAddAccessibilityModifiers.cs (1)
58case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
37=> ImmutableArray.Create(SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration);
CSharpSyntaxFacts.cs (1)
818case SyntaxKind.FileScopedNamespaceDeclaration:
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (2)
52context.RegisterSyntaxNodeAction(AnalyzeNamespaceNode, SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration); 90t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
CSharpCodeGenerationHelpers.cs (1)
233SyntaxKind.FileScopedNamespaceDeclaration => CodeGenerationDestination.Namespace,
CSharpCodeGenerationService.cs (1)
900case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
64(i == 0 && currentUsing.IsParentKind(SyntaxKind.FileScopedNamespaceDeclaration)))
Microsoft.CodeAnalysis.CSharp.Features (14)
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)))
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
30=> context.RegisterSyntaxNodeAction(AnalyzeNamespace, SyntaxKind.FileScopedNamespaceDeclaration);
CSharpAddAccessibilityModifiers.cs (1)
58case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpDeclarationComputer.cs (1)
78case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
37=> ImmutableArray.Create(SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
1433if (node.Kind() is SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or SyntaxKind.FileScopedNamespaceDeclaration) 1610case SyntaxKind.FileScopedNamespaceDeclaration: 1980case SyntaxKind.FileScopedNamespaceDeclaration:
EditAndContinue\SyntaxComparer.cs (2)
584case SyntaxKind.FileScopedNamespaceDeclaration: 1413case SyntaxKind.FileScopedNamespaceDeclaration:
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (2)
52context.RegisterSyntaxNodeAction(AnalyzeNamespaceNode, SyntaxKind.NamespaceDeclaration, SyntaxKind.FileScopedNamespaceDeclaration); 90t => t.Kind() is not (SyntaxKind.UsingDirective or SyntaxKind.NamespaceDeclaration or 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 (32)
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\ParsingErrorRecoveryTests.cs (1)
6332Assert.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)
3429N(SyntaxKind.FileScopedNamespaceDeclaration);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
145case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpAccessibilityFacts.cs (1)
192case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpCodeGenerationHelpers.cs (1)
233SyntaxKind.FileScopedNamespaceDeclaration => CodeGenerationDestination.Namespace,
CSharpCodeGenerationService.cs (1)
900case SyntaxKind.FileScopedNamespaceDeclaration:
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
64(i == 0 && currentUsing.IsParentKind(SyntaxKind.FileScopedNamespaceDeclaration)))
CSharpSyntaxFacts.cs (1)
818case SyntaxKind.FileScopedNamespaceDeclaration:
Simplification\Simplifiers\NameSimplifier.cs (1)
547case SyntaxKind.FileScopedNamespaceDeclaration:
Microsoft.VisualStudio.LanguageServices.CSharp (10)
CodeModel\CSharpCodeModelService.cs (7)
105case SyntaxKind.FileScopedNamespaceDeclaration: 139case SyntaxKind.FileScopedNamespaceDeclaration: 566case SyntaxKind.FileScopedNamespaceDeclaration: 598case SyntaxKind.FileScopedNamespaceDeclaration: 832case SyntaxKind.FileScopedNamespaceDeclaration: 907case SyntaxKind.FileScopedNamespaceDeclaration: 3514case SyntaxKind.FileScopedNamespaceDeclaration:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
69case SyntaxKind.FileScopedNamespaceDeclaration: 120case SyntaxKind.FileScopedNamespaceDeclaration:
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (1)
167case SyntaxKind.FileScopedNamespaceDeclaration: