207 references to NamespaceDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (14)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
822public sealed override Binder VisitNamespaceDeclaration(NamespaceDeclarationSyntax parent)
Compilation\CSharpSemanticModel.cs (2)
2959public abstract INamespaceSymbol GetDeclaredSymbol(NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 5109return this.GetDeclaredSymbol((NamespaceDeclarationSyntax)node, cancellationToken);
Compilation\MemberSemanticModel.cs (1)
591public override INamespaceSymbol GetDeclaredSymbol(NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
255public override INamespaceSymbol GetDeclaredSymbol(NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (1)
1306public override INamespaceSymbol GetDeclaredSymbol(NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (1)
1361public static INamespaceSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, NamespaceDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Declarations\DeclarationTreeBuilder.cs (3)
496public override SingleNamespaceOrTypeDeclaration VisitNamespaceDeclaration(NamespaceDeclarationSyntax node) 537else if (node.Parent is NamespaceDeclarationSyntax) 568Debug.Assert(node is NamespaceDeclarationSyntax);
Syntax\LookupPosition.cs (1)
163internal static bool IsInNamespaceDeclaration(int position, NamespaceDeclarationSyntax namespaceDecl)
Syntax\NamespaceDeclarationSyntax.cs (1)
21public NamespaceDeclarationSyntax Update(SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\SyntaxFactory.cs (2)
2700public static NamespaceDeclarationSyntax NamespaceDeclaration(NameSyntax name, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members) 2704public static NamespaceDeclarationSyntax NamespaceDeclaration(SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (1)
50if (declaration is not NamespaceDeclarationSyntax namespaceDeclaration)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (2)
34var namespaceDeclaration = (NamespaceDeclarationSyntax)context.Node;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
100NamespaceDeclarationSyntax namespaceNode => (namespaceNode.OpenBraceToken, namespaceNode.CloseBraceToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\AnchorIndentationFormattingRule.cs (1)
57case NamespaceDeclarationSyntax namespaceNode:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
112if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent is BaseTypeDeclarationSyntax or NamespaceDeclarationSyntax) 314if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent is BaseTypeDeclarationSyntax or NamespaceDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
351previousToken.Parent is NamespaceDeclarationSyntax);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (16)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (11)
30NamespaceDeclarationSyntax namespaceDeclaration => ConvertNamespaceDeclarationAsync(document, namespaceDeclaration, options, cancellationToken), 37public static async Task<Document> ConvertNamespaceDeclarationAsync(Document document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 62public static (SourceText text, TextSpan semicolonSpan) ConvertNamespaceDeclaration(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 82ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxAnnotation annotation) 92private static string? GetIndentation(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 201var blockScopedNamespace = (NamespaceDeclarationSyntax)root.GetAnnotatedNodes(annotation).Single(); 262var converted = ConvertFileScopedNamespace(document, namespaceDeclaration, lineEnding, newLinePlacement); 323private static FileScopedNamespaceDeclarationSyntax ConvertNamespaceDeclaration(NamespaceDeclarationSyntax namespaceDeclaration) 382private static NamespaceDeclarationSyntax ConvertFileScopedNamespace(ParsedDocument document, FileScopedNamespaceDeclarationSyntax fileScopedNamespace, string lineEnding, NewLinePlacement newLinePlacement) 424var namespaceDeclaration = NamespaceDeclaration(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
124if (member is NamespaceDeclarationSyntax namespaceDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
439if (token.IsKind(SyntaxKind.OpenBraceToken) && token.Parent is NamespaceDeclarationSyntax or TypeDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
23return declarationSyntax is NamespaceDeclarationSyntax namespaceDeclaration
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpAddImportsService.cs (1)
131public override SyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
198public override SyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
615NamespaceDeclarationSyntax => node.GetBraces().openBrace.SpanStart,
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (2)
464NamespaceDeclarationSyntax namespaceDeclarationNode => ShouldAddBraceForNamespaceDeclaration(namespaceDeclarationNode, caretPosition), 491private static bool ShouldAddBraceForNamespaceDeclaration(NamespaceDeclarationSyntax namespaceDeclarationNode, int caretPosition)
ConvertNamespace\ConvertNamespaceCommandHandler.cs (1)
132var namespaceDecl = token.GetRequiredParent().GetAncestor<NamespaceDeclarationSyntax>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Structure\NamespaceDeclarationStructureTests.cs (1)
15public class NamespaceDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<NamespaceDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Features (26)
BraceCompletion\CurlyBraceCompletionService.cs (1)
191if (currentToken.Parent is BaseTypeDeclarationSyntax or NamespaceDeclarationSyntax)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
316var targetNamespaceDecl = NamespaceDeclaration( 460if (baseNamespace is NamespaceDeclarationSyntax namespaceDeclaration)
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (1)
81if (baseDeclaration is NamespaceDeclarationSyntax namespaceDeclaration)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
223typeDeclaration.Parent is NamespaceDeclarationSyntax namespaceDeclaration)
ExtractMethod\Extensions.cs (1)
105if (ancestor is NamespaceDeclarationSyntax)
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
155NamespaceDeclarationSyntax ns => (TSyntax)(object)ns.WithMembers(AddNullableRegions(ns.Members, cancellationToken)),
MoveToNamespace\CSharpMoveToNamespaceService.cs (1)
34NamespaceDeclarationSyntax namespaceDeclaration => namespaceDeclaration.OpenBraceToken.SpanStart,
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (1)
50if (declaration is not NamespaceDeclarationSyntax namespaceDeclaration)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (2)
34var namespaceDeclaration = (NamespaceDeclarationSyntax)context.Node;
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (11)
30NamespaceDeclarationSyntax namespaceDeclaration => ConvertNamespaceDeclarationAsync(document, namespaceDeclaration, options, cancellationToken), 37public static async Task<Document> ConvertNamespaceDeclarationAsync(Document document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 62public static (SourceText text, TextSpan semicolonSpan) ConvertNamespaceDeclaration(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 82ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxAnnotation annotation) 92private static string? GetIndentation(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 201var blockScopedNamespace = (NamespaceDeclarationSyntax)root.GetAnnotatedNodes(annotation).Single(); 262var converted = ConvertFileScopedNamespace(document, namespaceDeclaration, lineEnding, newLinePlacement); 323private static FileScopedNamespaceDeclarationSyntax ConvertNamespaceDeclaration(NamespaceDeclarationSyntax namespaceDeclaration) 382private static NamespaceDeclarationSyntax ConvertFileScopedNamespace(ParsedDocument document, FileScopedNamespaceDeclarationSyntax fileScopedNamespace, string lineEnding, NewLinePlacement newLinePlacement) 424var namespaceDeclaration = NamespaceDeclaration(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
124if (member is NamespaceDeclarationSyntax namespaceDeclaration)
Structure\CSharpBlockStructureProvider.cs (1)
42builder.Add<NamespaceDeclarationSyntax, NamespaceDeclarationStructureProvider>();
Structure\Providers\NamespaceDeclarationStructureProvider.cs (2)
13internal class NamespaceDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<NamespaceDeclarationSyntax> 17NamespaceDeclarationSyntax namespaceDeclaration,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Diagnostics\Suppression\SuppressionTests.cs (4)
1080var ns = (NamespaceDeclarationSyntax)context.Node; 2074var ns = (NamespaceDeclarationSyntax)context.Node;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\InteractiveSemanticModelTests.cs (1)
41var classB = (root.Members[1] as NamespaceDeclarationSyntax).Members[0] as TypeDeclarationSyntax;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (39)
Compilation\SemanticModelAPITests.cs (6)
407var nsSyntax = nsArray[0] as NamespaceDeclarationSyntax; 818var nDecl = root.Members[0] as NamespaceDeclarationSyntax; 819var n2Decl = root.Members[1] as NamespaceDeclarationSyntax;
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (31)
104var decl = (NamespaceDeclarationSyntax)root.Members[1]; 147var classC = (root.Members[0] as NamespaceDeclarationSyntax).Members[0] as TypeDeclarationSyntax; 170Members[1] as NamespaceDeclarationSyntax). 939var nsDecl = (NamespaceDeclarationSyntax)root.Members[0]; 959nsDecl = (NamespaceDeclarationSyntax)root.Members[1]; 1710var namespaceDecl = (NamespaceDeclarationSyntax)cu.Members[0]; 2790var nsSyntax = (root.Members[1] as NamespaceDeclarationSyntax); 2813var n2 = (NamespaceDeclarationSyntax)root.Members[1]; 2912var nsSyntax = (root.Members[0] as NamespaceDeclarationSyntax); 2915var nsSyntax23 = (nsSyntax.Members[0] as NamespaceDeclarationSyntax); 2939var nsSyntax = (root.Members[0] as NamespaceDeclarationSyntax); 3050var nsSyntax = (root.Members[0] as NamespaceDeclarationSyntax); 3079var nsSyntax = (root.Members[1] as NamespaceDeclarationSyntax); 3115var nsSyntax1 = (root.Members[0] as NamespaceDeclarationSyntax); 3116var nsSyntax2 = (nsSyntax1.Members[0] as NamespaceDeclarationSyntax); 3738var decl = (NamespaceDeclarationSyntax)root.Members[0]; 3750var decl2 = (NamespaceDeclarationSyntax)root2.Members[0];
Symbols\ImplicitClassTests.cs (2)
116var namespaceDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (34)
Generated\Syntax.Test.xml.Generated.cs (5)
10688private static NamespaceDeclarationSyntax GenerateNamespaceDeclaration() 12849var node = GenerateNamespaceDeclaration(); 12861var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithNamespaceKeyword(node.NamespaceKeyword).WithName(node.Name).WithOpenBraceToken(node.OpenBraceToken).WithExterns(node.Externs).WithUsings(node.Usings).WithMembers(node.Members).WithCloseBraceToken(node.CloseBraceToken).WithSemicolonToken(node.SemicolonToken); 18077var oldNode = GenerateNamespaceDeclaration(); 18093var oldNode = GenerateNamespaceDeclaration();
Parsing\DeclarationParsingTests.cs (18)
571var ns = (NamespaceDeclarationSyntax)file.Members[0]; 614var ns = (NamespaceDeclarationSyntax)file.Members[0]; 636var ns = (NamespaceDeclarationSyntax)file.Members[0]; 681var ns = (NamespaceDeclarationSyntax)file.Members[0]; 726var ns = (NamespaceDeclarationSyntax)file.Members[0]; 750var ns = (NamespaceDeclarationSyntax)file.Members[0]; 758var ns2 = (NamespaceDeclarationSyntax)ns.Members[0]; 5633var ns = (NamespaceDeclarationSyntax)file.Members[0]; 5645ns = (NamespaceDeclarationSyntax)file.Members[0]; 5657ns = (NamespaceDeclarationSyntax)file.Members[0];
Parsing\ParsingErrorRecoveryTests.cs (9)
7113Assert.False(((NamespaceDeclarationSyntax)namespaceDeclaration).Name.IsMissing); 7941var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 7982var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 8006var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 8030var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single();
Syntax\SyntaxFactoryTests.cs (1)
61var n = SyntaxFactory.NamespaceDeclaration(name: SyntaxFactory.IdentifierName(SyntaxFactory.Identifier("goo")));
Syntax\SyntaxListTests.cs (1)
243var declaration = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("M"));
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
OrganizeImports\CSharpOrganizeImportsService.Rewriter.cs (1)
55public override SyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
100NamespaceDeclarationSyntax namespaceNode => (namespaceNode.OpenBraceToken, namespaceNode.CloseBraceToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\AnchorIndentationFormattingRule.cs (1)
57case NamespaceDeclarationSyntax namespaceNode:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
112if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent is BaseTypeDeclarationSyntax or NamespaceDeclarationSyntax) 314if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentToken.Parent is BaseTypeDeclarationSyntax or NamespaceDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
351previousToken.Parent is NamespaceDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
439if (token.IsKind(SyntaxKind.OpenBraceToken) && token.Parent is NamespaceDeclarationSyntax or TypeDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
23return declarationSyntax is NamespaceDeclarationSyntax namespaceDeclaration
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpAddImportsService.cs (1)
131public override SyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
198public override SyntaxNode VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (6)
CodeGeneration\SyntaxGeneratorTests.cs (4)
1751VerifySyntax<NamespaceDeclarationSyntax>( 1755VerifySyntax<NamespaceDeclarationSyntax>( 1759VerifySyntax<NamespaceDeclarationSyntax>( 1764VerifySyntax<NamespaceDeclarationSyntax>(
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (2)
123var namespaceDeclaration = (NamespaceDeclarationSyntax)compilationUnit.Members[0];
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
SyntaxPathTests.cs (16)
147var namespaceDecl = (NamespaceDeclarationSyntax)(tree.GetRoot() as CompilationUnitSyntax).Members[0]; 185var namespaceDecl = (NamespaceDeclarationSyntax)(tree.GetRoot() as CompilationUnitSyntax).Members[0]; 218var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0]; 250var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0]; 278var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0]; 309var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0]; 338var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0]; 377var namespaceDecl = (NamespaceDeclarationSyntax)((CompilationUnitSyntax)tree.GetRoot()).Members[0];
Microsoft.DotNet.GenFacades (7)
NotSupportedAssemblyGenerator.cs (2)
201if (node.Parent is NamespaceDeclarationSyntax parentNamespace) 213private string GetFullyQualifiedName(NamespaceDeclarationSyntax node) => node.Name.ToFullString().Trim();
TypeParser.cs (5)
79if (item.Parent is NamespaceDeclarationSyntax parent) 96if (node.Parent is NamespaceDeclarationSyntax parent) 128private static string GetNamespaceName(NamespaceDeclarationSyntax namespaceSyntax) 155if (token.Parent == null || token.Parent is NamespaceDeclarationSyntax) 163if (token.Parent == null || token.Parent is NamespaceDeclarationSyntax)
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
504potentialNamespaceParent is not NamespaceDeclarationSyntax 522namespaceParent = namespaceParent.Parent as NamespaceDeclarationSyntax;
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
EmitterTests.cs (1)
121.OfType<NamespaceDeclarationSyntax>()
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (2)
291potentialNamespaceParent is not NamespaceDeclarationSyntax && 303namespaceParent = namespaceParent.Parent as NamespaceDeclarationSyntax;
Microsoft.Gen.Metrics (2)
Parser.cs (2)
109potentialNamespaceParent is not NamespaceDeclarationSyntax && 121ns = ns.Parent as NamespaceDeclarationSyntax;
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
109potentialNamespaceParent is not NamespaceDeclarationSyntax && 121ns = ns.Parent as NamespaceDeclarationSyntax;
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSExportGenerator.cs (2)
217private static NamespaceDeclarationSyntax GenerateRegSource( 291var ns = NamespaceDeclaration(IdentifierName(generatedNamespace))
Microsoft.ML.InternalCodeAnalyzer (2)
NameAnalyzer.cs (2)
113var node = ((NamespaceDeclarationSyntax)context.Node);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
582if (node is NamespaceDeclarationSyntax namespaceDeclaration) 1161if (node is NamespaceDeclarationSyntax namespaceDeclaration)
System.Private.CoreLib.Generators (4)
EventSourceGenerator.Parser.cs (4)
22NamespaceDeclarationSyntax? ns = classDef.Parent as NamespaceDeclarationSyntax; 78private static string? ConstructNamespace(NamespaceDeclarationSyntax? ns) 86ns = ns.Parent as NamespaceDeclarationSyntax;
System.Windows.Forms.Analyzers.CSharp (2)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (2)
64.FirstOrDefault(a => a is NamespaceDeclarationSyntax) is NamespaceDeclarationSyntax namespaceSyntax)