2 types derived from NamespaceOrTypeSymbol
Microsoft.CodeAnalysis.CSharp (2)
Symbols\NamespaceSymbol.cs (1)
19internal abstract partial class NamespaceSymbol : NamespaceOrTypeSymbol, INamespaceSymbolInternal
Symbols\TypeSymbol.cs (1)
28internal abstract partial class TypeSymbol : NamespaceOrTypeSymbol, ITypeSymbolInternal
257 references to NamespaceOrTypeSymbol
Microsoft.CodeAnalysis.CSharp (217)
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (2)
40internal NamespaceOrTypeSymbol NamespaceOrTypeSymbol => Symbol as NamespaceOrTypeSymbol;
Binder\Binder_Crefs.cs (11)
46NamespaceOrTypeSymbol result = BindNamespaceOrTypeSymbolInCref(syntax.Type); 67NamespaceOrTypeSymbol container = BindNamespaceOrTypeSymbolInCref(syntax.Container); 81private NamespaceOrTypeSymbol BindNamespaceOrTypeSymbolInCref(TypeSyntax syntax) 93NamespaceOrTypeSymbol namespaceOrTypeSymbol = BindNamespaceOrTypeSymbol(syntax, BindingDiagnosticBag.Discarded).NamespaceOrTypeSymbol; 99private ImmutableArray<Symbol> BindMemberCref(MemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics) 142private ImmutableArray<Symbol> BindNameMemberCref(NameMemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics) 193private ImmutableArray<Symbol> BindIndexerMemberCref(IndexerMemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics) 221private ImmutableArray<Symbol> BindOperatorMemberCref(OperatorMemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics) 264private ImmutableArray<Symbol> BindConversionOperatorMemberCref(ConversionOperatorMemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics) 329private ImmutableArray<Symbol> ComputeSortedCrefMembers(CSharpSyntaxNode syntax, NamespaceOrTypeSymbol? containerOpt, string memberName, string memberNameText, int arity, bool hasParameterList, BindingDiagnosticBag diagnostics) 337private ImmutableArray<Symbol> ComputeSortedCrefMembers(NamespaceOrTypeSymbol? containerOpt, string memberName, string memberNameText, int arity, bool hasParameterList, CSharpSyntaxNode syntax,
Binder\Binder_Expressions.cs (1)
7748private Symbol GetSymbolOrMethodOrPropertyGroup(LookupResult result, SyntaxNode node, string plainName, int arity, ArrayBuilder<Symbol> methodOrPropertyGroup, BindingDiagnosticBag diagnostics, out bool wasError, NamespaceOrTypeSymbol qualifierOpt)
Binder\Binder_Lookup.cs (12)
29NamespaceOrTypeSymbol qualifierOpt, 127NamespaceOrTypeSymbol qualifierOpt, 148private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 164protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 306var error = new ExtendedErrorTypeSymbol((NamespaceOrTypeSymbol)null, name, arity, diagInfo, unreported: true); 489NamespaceOrTypeSymbol qualifierOpt, 1293internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, string name, LookupOptions options, Binder originalBinder) 1317internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1430else if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && !(unwrappedSymbol is NamespaceOrTypeSymbol)) 1592if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && !(symbol is NamespaceOrTypeSymbol)) 1851internal void AddMemberLookupSymbolsInfo(LookupSymbolsInfo result, NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1940var targetSymbol = aliasSymbol.GetAliasTarget(basesBeingResolved: null);
Binder\Binder_Symbols.cs (21)
346private NamespaceOrTypeSymbol GetContainingNamespaceOrType(Symbol symbol) 578NamespaceOrTypeSymbol left = bindingResult is AliasSymbol alias ? alias.Target : (NamespaceOrTypeSymbol)bindingResult; 820NamespaceOrTypeSymbol qualifierOpt = null) 847NamespaceOrTypeSymbol qualifierOpt) 908var aliasTarget = ((AliasSymbol)bindingResult).GetAliasTarget(basesBeingResolved); 1097return NamespaceOrTypeOrAliasSymbolWithAnnotations.CreateUnannotated(symbol.IsNullableEnabled, (NamespaceOrTypeSymbol)UnwrapAlias(symbol.Symbol, out discarded, diagnostics, syntax, basesBeingResolved)); 1107return NamespaceOrTypeOrAliasSymbolWithAnnotations.CreateUnannotated(symbol.IsNullableEnabled, (NamespaceOrTypeSymbol)UnwrapAlias(symbol.Symbol, out alias, diagnostics, syntax, basesBeingResolved)); 1128var result = alias.GetAliasTarget(basesBeingResolved); 1152NamespaceOrTypeSymbol qualifierOpt) 1260NamespaceOrTypeSymbol qualifierOpt, 1320NamespaceOrTypeSymbol qualifierOpt, 1591var left = BindNamespaceOrTypeSymbol(leftName, diagnostics, basesBeingResolved, suppressUseSiteDiagnostics: false).NamespaceOrTypeSymbol; 1865NamespaceOrTypeSymbol qualifierOpt, 1894NamespaceOrTypeSymbol qualifierOpt, 2151if (first is NamespaceOrTypeSymbol && second is NamespaceOrTypeSymbol) 2293if ((symbols.Count > 1) || (symbols[0] is NamespaceOrTypeSymbol || symbols[0] is AliasSymbol) || 2500private CSDiagnosticInfo NotFound(SyntaxNode where, string simpleName, int arity, string whereText, BindingDiagnosticBag diagnostics, string aliasOpt, NamespaceOrTypeSymbol qualifierOpt, LookupOptions options) 2582protected virtual AssemblySymbol GetForwardedToAssemblyInUsingNamespaces(string metadataName, ref NamespaceOrTypeSymbol qualifierOpt, BindingDiagnosticBag diagnostics, Location location) 2655protected AssemblySymbol GetForwardedToAssembly(string name, int arity, ref NamespaceOrTypeSymbol qualifierOpt, BindingDiagnosticBag diagnostics, Location location)
Binder\BinderFactory.BinderFactoryVisitor.cs (8)
651var container = ((NamespaceOrTypeSymbol)outer.ContainingMemberOrLambda).GetSourceTypeMember(parent); 686var container = ((NamespaceOrTypeSymbol)outer.ContainingMemberOrLambda).GetSourceTypeMember(parent.Identifier.ValueText, 0, SyntaxKind.EnumDeclaration, parent); 751var typeSymbol = ((NamespaceOrTypeSymbol)resultBinder.ContainingMemberOrLambda).GetSourceTypeMember(parent); 880NamespaceOrTypeSymbol container; 1226SourceNamedTypeSymbol type = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((TypeDeclarationSyntax)memberSyntax); 1263SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax); 1300SourceNamedTypeSymbol typeSymbol = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember(typeDeclSyntax); 1319SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax);
Binder\ImportChain.cs (2)
79NamespaceOrTypeSymbol namespaceOrType = nsOrType.NamespaceOrType; 109NamespaceOrTypeSymbol target = symbol.Target;
Binder\Imports.cs (1)
102var previousTarget = previousUsing.NamespaceOrType;
Binder\InContainerBinder.cs (4)
23private readonly NamespaceOrTypeSymbol _container; 28internal InContainerBinder(NamespaceOrTypeSymbol container, Binder next) 35internal NamespaceOrTypeSymbol Container 121var error = new ExtendedErrorTypeSymbol((NamespaceOrTypeSymbol)null, name, arity, diagInfo, unreported: true);
Binder\NamespaceOrTypeAndUsingDirective.cs (2)
13public readonly NamespaceOrTypeSymbol NamespaceOrType; 17public NamespaceOrTypeAndUsingDirective(NamespaceOrTypeSymbol namespaceOrType, UsingDirectiveSyntax? usingDirective, ImmutableArray<AssemblySymbol> dependencies)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
51protected override AssemblySymbol? GetForwardedToAssemblyInUsingNamespaces(string name, ref NamespaceOrTypeSymbol qualifierOpt, BindingDiagnosticBag diagnostics, Location location)
Compilation\CSharpCompilation.cs (19)
1473var uniqueUsings = PooledHashSet<NamespaceOrTypeSymbol>.GetInstance(); 1765var mainTypeOrNamespace = globalNamespace.GetNamespaceOrTypeByQualifiedName(mainTypeName.Split('.')).OfMinimalArity(); 4522private readonly PooledDictionary<Declaration, NamespaceOrTypeSymbol> _cache; 4532_cache = PooledDictionary<Declaration, NamespaceOrTypeSymbol>.GetInstance(); 4566var container = GetSpineSymbol(spine); 4567var symbol = GetSymbol(container, current); 4578var container = GetSpineSymbol(spine); 4579var symbol = GetSymbol(container, current); 4619var container = GetSpineSymbol(spine); 4636protected NamespaceOrTypeSymbol? GetSpineSymbol(ArrayBuilder<MergedNamespaceOrTypeDeclaration> spine) 4643var symbol = GetCachedSymbol(spine[spine.Count - 1]); 4649NamespaceOrTypeSymbol? current = _compilation.GlobalNamespace; 4658private NamespaceOrTypeSymbol? GetCachedSymbol(MergedNamespaceOrTypeDeclaration declaration) 4659=> _cache.TryGetValue(declaration, out NamespaceOrTypeSymbol? symbol) 4663private NamespaceOrTypeSymbol? GetSymbol(NamespaceOrTypeSymbol? container, MergedNamespaceOrTypeDeclaration declaration) 4672AddCache(container.GetMembers(declaration.Name).OfType<NamespaceOrTypeSymbol>()); 4682private void AddCache(IEnumerable<NamespaceOrTypeSymbol> symbols) 4684foreach (var symbol in symbols)
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (4)
39var uniqueUsings = PooledHashSet<NamespaceOrTypeSymbol>.GetInstance(); 60var imported = usingsBinder.BindNamespaceOrTypeSymbol(qualifiedName, directiveDiagnostics).NamespaceOrTypeSymbol; 143NamespaceOrTypeSymbol target = @using.NamespaceOrType; 166void recordImportDependencies(NamespaceOrTypeSymbol target)
Compilation\CSharpSemanticModel.cs (6)
1415NamespaceOrTypeSymbol container = null, 1485NamespaceOrTypeSymbol container = null, 1511NamespaceOrTypeSymbol container = null, 1560NamespaceOrTypeSymbol container, 1687private void AppendSymbolsWithName(ArrayBuilder<ISymbol> results, string name, Binder binder, NamespaceOrTypeSymbol container, LookupOptions options, LookupSymbolsInfo info) 1725NamespaceOrTypeSymbol container,
Compilation\SyntaxTreeSemanticModel.cs (13)
1331NamespaceOrTypeSymbol container; 1403var container = GetDeclaredTypeMemberContainer(declarationSyntax); 1410private NamespaceOrTypeSymbol GetDeclaredNamespaceOrType(CSharpSyntaxNode declarationSyntax) 1593var container = GetDeclaredTypeMemberContainer(propertyOrEventDecl); 1609NamespaceOrTypeSymbol container; 1726private Symbol GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan, NameSyntax name) 1736var left = GetDeclaredMember(container, declarationSpan, qn.Left) as NamespaceOrTypeSymbol; 1753private Symbol GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan, string name = null) 1827var container = GetDeclaredTypeMemberContainer(field); 2294private NamespaceOrTypeSymbol GetDeclaredTypeMemberContainer(CSharpSyntaxNode memberDeclaration) 2320var container = GetDeclaredNamespaceOrType(memberDeclaration.Parent); 2344var container = GetDeclaredTypeMemberContainer(declarationSyntax);
Compiler\ClsComplianceChecker.cs (1)
795private void CheckMemberDistinctness(NamespaceOrTypeSymbol symbol)
Emitter\Model\PEModuleBuilder.cs (10)
220var namespacesAndTopLevelTypesToProcess = ArrayBuilder<NamespaceOrTypeSymbol>.GetInstance(); 224var symbol = namespacesAndTopLevelTypesToProcess.Pop(); 241namespacesAndTopLevelTypesToProcess.Push((NamespaceOrTypeSymbol)member); 333var namespacesAndTypesToProcess = new Stack<NamespaceOrTypeSymbol>(); 340NamespaceOrTypeSymbol symbol = namespacesAndTypesToProcess.Pop(); 356namespacesAndTypesToProcess.Push((NamespaceOrTypeSymbol)member); 378namespacesAndTypesToProcess.Push((NamespaceOrTypeSymbol)member); 562private static void GetExportedTypes(NamespaceOrTypeSymbol symbol, int parentIndex, ArrayBuilder<Cci.ExportedType> builder) 583var namespaceOrType = member as NamespaceOrTypeSymbol;
Symbols\AliasSymbol.cs (17)
73internal static AliasSymbol CreateCustomDebugInfoAlias(NamespaceOrTypeSymbol targetSymbol, SyntaxToken aliasToken, Symbol containingSymbol, bool isExtern) 82var previousTarget = Target; 110/// Gets the <see cref="NamespaceOrTypeSymbol"/> for the 113public abstract NamespaceOrTypeSymbol Target 230internal abstract NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved); 285private NamespaceOrTypeSymbol? _aliasTarget; 305/// Gets the <see cref="NamespaceOrTypeSymbol"/> for the 308public override NamespaceOrTypeSymbol Target 317internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved) 325NamespaceOrTypeSymbol symbol = this.IsExtern 375private NamespaceOrTypeSymbol ResolveAliasTarget( 420var namespaceOrType = annotatedNamespaceOrType.NamespaceOrTypeSymbol; 439private readonly NamespaceOrTypeSymbol _aliasTarget; 441internal AliasSymbolFromResolvedTarget(NamespaceOrTypeSymbol target, string aliasName, Symbol containingSymbol, ImmutableArray<Location> locations, bool isExtern) 448/// Gets the <see cref="NamespaceOrTypeSymbol"/> for the 451public override NamespaceOrTypeSymbol Target 459internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved)
Symbols\ExtendedErrorTypeSymbol.cs (6)
22private readonly NamespaceOrTypeSymbol? _containingSymbol; 33internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, string name, int arity, DiagnosticInfo? errorInfo, bool unreported = false, bool variableUsedBeforeDeclaration = false) 52private ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, string name, int arity, DiagnosticInfo? errorInfo, bool unreported, bool variableUsedBeforeDeclaration, ImmutableArray<Symbol> candidateSymbols, LookupResultKind resultKind) 64internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol guessSymbol, LookupResultKind resultKind, DiagnosticInfo errorInfo, bool unreported = false) 69internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, Symbol guessSymbol, LookupResultKind resultKind, DiagnosticInfo errorInfo, bool unreported = false) 74internal ExtendedErrorTypeSymbol(NamespaceOrTypeSymbol? containingSymbol, ImmutableArray<Symbol> candidateSymbols, LookupResultKind resultKind, DiagnosticInfo errorInfo, int arity, bool unreported = false)
Symbols\MemberSymbolExtensions.cs (4)
305internal static NamespaceOrTypeSymbol OfMinimalArity(this IEnumerable<NamespaceOrTypeSymbol> symbols) 307NamespaceOrTypeSymbol minAritySymbol = null; 309foreach (var symbol in symbols)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (4)
32private readonly NamespaceOrTypeSymbol _container; 273NamespaceOrTypeSymbol container, 2456NamespaceOrTypeSymbol container, 2525NamespaceOrTypeSymbol container,
Symbols\MissingMetadataTypeSymbol.cs (1)
252foreach (NamespaceOrTypeSymbol symbol in container.GetMembers(namespaces[i]))
Symbols\NamedTypeSymbol.cs (1)
700/// <see cref="NamespaceOrTypeSymbol.GetMembersUnordered"/>.
Symbols\NamespaceOrTypeSymbol.cs (6)
248NamespaceOrTypeSymbol scope = this; 376internal IEnumerable<NamespaceOrTypeSymbol>? GetNamespaceOrTypeByQualifiedName(IEnumerable<string> qualifiedName) 378NamespaceOrTypeSymbol namespaceOrType = this; 379IEnumerable<NamespaceOrTypeSymbol>? symbols = null; 388return SpecializedCollections.EmptyEnumerable<NamespaceOrTypeSymbol>(); 392symbols = namespaceOrType.GetMembers(name).OfType<NamespaceOrTypeSymbol>();
Symbols\NamespaceSymbol.cs (1)
256foreach (NamespaceOrTypeSymbol symbol in scope.GetMembers(name))
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
33internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\DynamicTypeSymbol.cs (1)
30internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\ErrorTypeSymbol.cs (1)
30internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
23internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (1)
11internal abstract Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol { get; }
Symbols\PublicModel\NamespaceSymbol.cs (3)
24internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying; 45yield return ((Symbols.NamespaceOrTypeSymbol)n).GetPublicSymbol(); 53yield return ((Symbols.NamespaceOrTypeSymbol)n).GetPublicSymbol();
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
31internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\PointerTypeSymbol.cs (1)
31internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\PublicModel\TypeParameterSymbol.cs (1)
32internal override Symbols.NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Symbols\Source\ImplicitNamedTypeSymbol.cs (1)
21internal ImplicitNamedTypeSymbol(NamespaceOrTypeSymbol containingSymbol, MergedTypeDeclaration declaration, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
181private readonly NamespaceOrTypeSymbol _containingSymbol; 210NamespaceOrTypeSymbol containingSymbol,
Symbols\Source\SourceNamedTypeSymbol.cs (1)
84internal SourceNamedTypeSymbol(NamespaceOrTypeSymbol containingSymbol, MergedTypeDeclaration declaration, BindingDiagnosticBag diagnostics, TupleExtraData tupleData = null)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (13)
254var uniqueUsings = SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<NamespaceOrTypeSymbol>(); 637PooledHashSet<NamespaceOrTypeSymbol>? uniqueUsings = null; 638PooledHashSet<NamespaceOrTypeSymbol>? uniqueGlobalUsings = null; 732var imported = declarationBinder.BindNamespaceOrTypeSymbol(usingDirective.NamespaceOrType, directiveDiagnostics, basesBeingResolved).NamespaceOrTypeSymbol; 815static PooledHashSet<NamespaceOrTypeSymbol> getOrCreateUniqueUsings(ref PooledHashSet<NamespaceOrTypeSymbol>? uniqueUsings, ImmutableArray<NamespaceOrTypeAndUsingDirective> globalUsingNamespacesOrTypes) 819uniqueUsings = SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<NamespaceOrTypeSymbol>(); 826static PooledHashSet<NamespaceOrTypeSymbol> getOrCreateUniqueGlobalUsingsNotInTree(ref PooledHashSet<NamespaceOrTypeSymbol>? uniqueUsings, ImmutableArray<NamespaceOrTypeAndUsingDirective> globalUsingNamespacesOrTypes, SyntaxTree tree) 830uniqueUsings = SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<NamespaceOrTypeSymbol>(); 936NamespaceOrTypeSymbol target = alias.Alias.GetAliasTarget(basesBeingResolved: null); 965NamespaceOrTypeSymbol target = @using.NamespaceOrType; 1018void recordImportDependencies(UsingDirectiveSyntax usingDirective, NamespaceOrTypeSymbol target)
Symbols\Source\SourceNamespaceSymbol.cs (25)
28private Dictionary<string, ImmutableArray<NamespaceOrTypeSymbol>> _nameToMembersMap; 167ImmutableArray<NamespaceOrTypeSymbol> members; 169? members.Cast<NamespaceOrTypeSymbol, Symbol>() 218private Dictionary<string, ImmutableArray<NamespaceOrTypeSymbol>> GetNameToMembersMap() 254private static Dictionary<string, ImmutableArray<NamedTypeSymbol>> GetTypesFromMemberMap(Dictionary<string, ImmutableArray<NamespaceOrTypeSymbol>> map) 260ImmutableArray<NamespaceOrTypeSymbol> members = kvp.Value; 265foreach (var symbol in members) 302private Dictionary<string, ImmutableArray<NamespaceOrTypeSymbol>> MakeNameToMembersMap(BindingDiagnosticBag diagnostics) 326private static void CheckMembers(NamespaceSymbol @namespace, Dictionary<string, ImmutableArray<NamespaceOrTypeSymbol>> result, BindingDiagnosticBag diagnostics) 339foreach (var symbol in result[name]) 424private NamespaceOrTypeSymbol BuildSymbol(MergedNamespaceOrTypeDeclaration declaration, BindingDiagnosticBag diagnostics) 462foreach (var member in array) 522public void Add(NamespaceOrTypeSymbol symbol) 528var builder = item as ArrayBuilder<NamespaceOrTypeSymbol>; 531builder = ArrayBuilder<NamespaceOrTypeSymbol>.GetInstance(); 532builder.Add((NamespaceOrTypeSymbol)item); 543public Dictionary<String, ImmutableArray<NamespaceOrTypeSymbol>> CreateMap() 545var result = new Dictionary<String, ImmutableArray<NamespaceOrTypeSymbol>>(_dictionary.Count, StringOrdinalComparer.Instance); 550ImmutableArray<NamespaceOrTypeSymbol> members; 552var builder = value as ArrayBuilder<NamespaceOrTypeSymbol>; 564: StaticCast<NamespaceOrTypeSymbol>.From(builder.ToDowncastedImmutable<NamedTypeSymbol>()); 570NamespaceOrTypeSymbol symbol = (NamespaceOrTypeSymbol)value; 572? ImmutableArray.Create<NamespaceOrTypeSymbol>(symbol) 573: StaticCast<NamespaceOrTypeSymbol>.From(ImmutableArray.Create<NamedTypeSymbol>((NamedTypeSymbol)symbol));
Symbols\SymbolExtensions.cs (5)
129internal static NamespaceOrTypeSymbol? ContainingNamespaceOrType(this Symbol symbol) 139return (NamespaceOrTypeSymbol)containingSymbol; 402internal static NamespaceOrTypeSymbol? EnsureCSharpSymbolOrNull(this INamespaceOrTypeSymbol? symbol, string paramName) 404return (NamespaceOrTypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 605internal static INamespaceOrTypeSymbol? GetPublicSymbol(this NamespaceOrTypeSymbol? symbol)
Symbols\SymbolVisitor`2.cs (1)
74/// cref="NamespaceOrTypeSymbol.GetMembers()" />
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationContext.cs (1)
1183NamespaceOrTypeSymbol targetSymbol,
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (12)
UsingDebugInfoTests.cs (12)
649var actualNamespace = imports.Usings.Single().NamespaceOrType; 690var actualNamespace = usings[i]; 733var actualNamespace = imports.Usings.Single().NamespaceOrType; 775var namespaceSymbol = aliasSymbol.Target; 808var actualType = imports.Usings.Single().NamespaceOrType; 848var typeSymbol = aliasSymbol.Target; 896var importedNamespace = @using.NamespaceOrType; 910var aliasedNamespace = namespaceAlias.Alias.Target; 915var aliasedType = typeAlias.Alias.Target; 955var typeSymbol = aliasSymbol.Target; 995var targetSymbol = aliasSymbol.Target; 1032var importedNamespace = @using.NamespaceOrType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\DelegateTypeTests.cs (1)
11471internal override NamespaceOrTypeSymbol UnderlyingNamespaceOrTypeSymbol => _underlying;
Semantics\LookupTests.cs (1)
34internal List<ISymbol> GetLookupSymbols(string testSrc, NamespaceOrTypeSymbol container = null, string name = null, int? arity = null, bool isScript = false, IEnumerable<string> globalUsings = null)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Symbols\CompilationCreationTests.cs (2)
2595NamespaceOrTypeSymbol current = c.GlobalNamespace; 2604current = (NamespaceOrTypeSymbol)matchingSym.First();
Symbols\MockSymbolTests.cs (1)
147if (sym is NamespaceOrTypeSymbol namespaceOrType && namespaceOrType.GetMembers().Any())
Symbols\Source\DelegateTests.cs (2)
202var namespaceNS = comp.GlobalNamespace.GetMembers("NS").First() as NamespaceOrTypeSymbol;
Symbols\Source\EnumTests.cs (3)
1032Assert.True(currentSymbol is NamespaceOrTypeSymbol, string.Format("{0} does not have members", currentSymbol.ToTestDisplayString())); 1033var currentContainer = (NamespaceOrTypeSymbol)currentSymbol;
Symbols\TypeTests.cs (4)
849var namespaceNS = comp.GlobalNamespace.GetMembers("NS").First() as NamespaceOrTypeSymbol; 1476var namespaceNS = comp.GlobalNamespace.GetMembers("NS").First() as NamespaceOrTypeSymbol;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (12)
Extensions.cs (10)
187NamespaceOrTypeSymbol lastContainer; 197private static ImmutableArray<Symbol> GetMembers(NamespaceOrTypeSymbol container, string qualifiedName, out NamespaceOrTypeSymbol lastContainer) 204var nestedContainer = (NamespaceOrTypeSymbol)lastContainer.GetMember(parts[i]); 243public static Symbol GetMember(this NamespaceOrTypeSymbol container, string qualifiedName) 245NamespaceOrTypeSymbol lastContainer; 275public static T GetMember<T>(this NamespaceOrTypeSymbol symbol, string qualifiedName) where T : Symbol 305public static NamedTypeSymbol GetTypeMember(this NamespaceOrTypeSymbol symbol, string name) 881NamespaceOrTypeSymbol qualifierOpt,
SymbolUtilities.cs (2)
56public static Symbol ChildSymbol(this NamespaceOrTypeSymbol parent, string name) 61public static T GetIndexer<T>(this NamespaceOrTypeSymbol type, string name) where T : PropertySymbol
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdDumpTest.cs (1)
32private void AppendMembers(StringBuilder result, NamespaceOrTypeSymbol container, string indent)