2 types derived from SingleNamespaceDeclaration
Microsoft.CodeAnalysis.CSharp (2)
Declarations\RootSingleNamespaceDeclaration.cs (1)
13internal sealed class RootSingleNamespaceDeclaration : SingleNamespaceDeclaration
Declarations\SingleNamespaceDeclarationEx.cs (1)
11internal sealed class SingleNamespaceDeclarationEx : SingleNamespaceDeclaration
1 instantiation of SingleNamespaceDeclaration
Microsoft.CodeAnalysis.CSharp (1)
Declarations\SingleNamespaceDeclaration.cs (1)
77return new SingleNamespaceDeclaration(
47 references to SingleNamespaceDeclaration
Microsoft.CodeAnalysis.CSharp (47)
Binder\WithExternAndUsingAliasesBinder.cs (1)
178foreach (var declaration in ((SourceNamespaceSymbol)Compilation.SourceModule.GlobalNamespace).MergedDeclaration.Declarations)
Compilation\CSharpCompilation.cs (1)
3079foreach (var singleDeclaration in ((SourceNamespaceSymbol)SourceModule.GlobalNamespace).MergedDeclaration.Declarations)
Declarations\DeclarationTable.Cache.cs (1)
47MergedNamespaceDeclaration.Create(_table._allOlderRootDeclarations.InInsertionOrder.Select(static lazyRoot => lazyRoot.Value).AsImmutable<SingleNamespaceDeclaration>()),
Declarations\DeclarationTable.cs (4)
128var builder = ArrayBuilder<SingleNamespaceDeclaration>.GetInstance(oldRootDeclarations.Length + 1); 140private sealed class RootNamespaceLocationComparer : IComparer<SingleNamespaceDeclaration> 152public int Compare(SingleNamespaceDeclaration? x, SingleNamespaceDeclaration? y)
Declarations\DeclarationTreeBuilder.cs (5)
348decl = SingleNamespaceDeclaration.Create( 499private SingleNamespaceDeclaration VisitBaseNamespaceDeclaration(BaseNamespaceDeclarationSyntax node) 509var ns = SingleNamespaceDeclaration.Create( 614return SingleNamespaceDeclaration.Create(
Declarations\MergedNamespaceDeclaration.cs (14)
19private readonly ImmutableArray<SingleNamespaceDeclaration> _declarations; 22private MergedNamespaceDeclaration(ImmutableArray<SingleNamespaceDeclaration> declarations) 28public static MergedNamespaceDeclaration Create(ImmutableArray<SingleNamespaceDeclaration> declarations) 33public static MergedNamespaceDeclaration Create(SingleNamespaceDeclaration declaration) 68foreach (var decl in _declarations) 79public ImmutableArray<SingleNamespaceDeclaration> Declarations 91ArrayBuilder<SingleNamespaceDeclaration> namespaces = null; 96foreach (var decl in _declarations) 119var asNamespace = child as SingleNamespaceDeclaration; 125namespaces = ArrayBuilder<SingleNamespaceDeclaration>.GetInstance(); 148static void addNamespacesToChildren(ArrayBuilder<SingleNamespaceDeclaration> namespaces, bool allNamespacesHaveSameName, ArrayBuilder<MergedNamespaceOrTypeDeclaration> children) 162var namespaceGroups = new Dictionary<string, ArrayBuilder<SingleNamespaceDeclaration>>(StringOrdinalComparer.Instance); 166var builder = namespaceGroups.GetOrAdd(n.Name, static () => ArrayBuilder<SingleNamespaceDeclaration>.GetInstance());
Declarations\SingleNamespaceDeclaration.cs (1)
63public static SingleNamespaceDeclaration Create(
Symbols\Source\SourceNamedTypeSymbol.cs (1)
783foreach (var decl in this.DeclaringCompilation.MergedRootDeclaration.Declarations)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (8)
69private SingleNamespaceDeclaration GetMatchingNamespaceDeclaration(CSharpSyntaxNode declarationSyntax) 71foreach (var declaration in _mergedDeclaration.Declarations) 89ref ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> dictionary, 90SingleNamespaceDeclaration declaration) 98private AliasesAndUsings GetAliasesAndUsings(SingleNamespaceDeclaration declaration) 104var singleDeclaration = GetMatchingNamespaceDeclaration(declarationSyntax); 272foreach (var singleDeclaration in _mergedDeclaration.Declarations) 351foreach (var singleDeclaration in _mergedDeclaration.Declarations)
Symbols\Source\SourceNamespaceSymbol.cs (9)
22private static readonly ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> s_emptyMap = 23ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings>.Empty.WithComparers(ReferenceEqualityComparer.Instance); 37/// Should only be read using <see cref="GetAliasesAndUsings(SingleNamespaceDeclaration)"/>. 39private ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> _aliasesAndUsings_doNotAccessDirectly = s_emptyMap; 44private ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> _aliasesAndUsingsForAsserts_doNotAccessDirectly = s_emptyMap; 63foreach (var singleDeclaration in mergedDeclaration.Declarations) 111foreach (var decl in _mergedDeclaration.Declarations) 121private static readonly Func<SingleNamespaceDeclaration, SyntaxReference> s_declaringSyntaxReferencesSelector = d => 464foreach (var declaration in _mergedDeclaration.Declarations)
Symbols\Source\SourceNamespaceSymbol_Completion.cs (2)
34SingleNamespaceDeclaration? targetDeclarationWithImports = null; 37foreach (var declaration in _mergedDeclaration.Declarations)