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