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