3 instantiations of NamespaceDefinitionHandle
System.Reflection.Metadata (3)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (3)
2456return new NamespaceDefinitionHandle((uint)stringHeapOffset); 2470return new NamespaceDefinitionHandle(TokenTypeIds.VirtualBit | virtualIndex); 2487return new NamespaceDefinitionHandle(
66 references to NamespaceDefinitionHandle
Microsoft.CodeAnalysis (8)
MetadataReader\PEModule.cs (8)
623internal readonly NamespaceDefinitionHandle NamespaceHandle; 625internal TypeDefToNamespace(TypeDefinitionHandle typeDef, NamespaceDefinitionHandle namespaceHandle) 742var namespaceHandles = new Dictionary<NamespaceDefinitionHandle, ArrayBuilder<TypeDefinitionHandle>>(NamespaceHandleEqualityComparer.Singleton); 745NamespaceDefinitionHandle nsHandle = pair.NamespaceHandle; 777private class NamespaceHandleEqualityComparer : IEqualityComparer<NamespaceDefinitionHandle> 785public bool Equals(NamespaceDefinitionHandle x, NamespaceDefinitionHandle y) 790public int GetHashCode(NamespaceDefinitionHandle obj)
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (3)
488foreach (var child in namespaceDefinition.NamespaceDefinitions) 659NamespaceDefinitionHandle namespaceHandle, 840MetadataReader reader, NamespaceDefinitionHandle namespaceHandle)
System.Reflection.Metadata (53)
System\Reflection\Metadata\Internal\NamespaceCache.cs (25)
15private volatile Dictionary<NamespaceDefinitionHandle, NamespaceData>? _namespaceTable; 34internal string GetFullName(NamespaceDefinitionHandle handle) 48internal NamespaceData GetNamespaceData(NamespaceDefinitionHandle handle) 75private StringHandle GetSimpleName(NamespaceDefinitionHandle fullNamespaceHandle, int segmentIndex = int.MaxValue) 114var namespaceBuilderTable = new Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder>(); 123NamespaceDefinitionHandle rootNamespace = NamespaceDefinitionHandle.FromFullNameOffset(0); 140var namespaceTable = new Dictionary<NamespaceDefinitionHandle, NamespaceData>(); 167private static void MergeDuplicateNamespaces(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table, out Dictionary<string, NamespaceDataBuilder> stringTable) 170List<KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>>? remaps = null; 181remaps ??= new List<KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>>(); 182remaps.Add(new KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>(group.Key, existingRecord)); 206private NamespaceDataBuilder SynthesizeNamespaceData(string fullName, NamespaceDefinitionHandle realChild) 224var namespaceHandle = NamespaceDefinitionHandle.FromVirtualIndex(++_virtualNamespaceCounter); 325private void PopulateTableWithTypeDefinitions(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table) 337NamespaceDefinitionHandle namespaceHandle = _metadataReader.TypeDefTable.GetNamespaceDefinition(typeHandle); 357private void PopulateTableWithExportedTypes(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table) 369NamespaceDefinitionHandle namespaceHandle = exportedType.NamespaceDefinition; 412public readonly NamespaceDefinitionHandle Handle; 415public NamespaceDefinitionHandle Parent; 416public ImmutableArray<NamespaceDefinitionHandle>.Builder? Namespaces; 422public NamespaceDataBuilder(NamespaceDefinitionHandle handle, StringHandle name, string fullName) 427Namespaces = ImmutableArray.CreateBuilder<NamespaceDefinitionHandle>(); 460Parent = default(NamespaceDefinitionHandle);
System\Reflection\Metadata\Internal\NamespaceData.cs (4)
12public readonly NamespaceDefinitionHandle Parent; 13public readonly ImmutableArray<NamespaceDefinitionHandle> NamespaceDefinitions; 20NamespaceDefinitionHandle parent, 21ImmutableArray<NamespaceDefinitionHandle> namespaceDefinitions,
System\Reflection\Metadata\Internal\Tables.cs (4)
167internal NamespaceDefinitionHandle GetNamespaceDefinition(TypeDefinitionHandle handle) 170return NamespaceDefinitionHandle.FromFullNameOffset(this.Block.PeekHeapReference(rowOffset + _NamespaceOffset, _IsStringHeapRefSizeSmall)); 2227internal NamespaceDefinitionHandle GetTypeNamespace(int rowId) 2230return NamespaceDefinitionHandle.FromFullNameOffset(this.Block.PeekHeapReference(rowOffset + _TypeNamespaceOffset, _IsStringHeapRefSizeSmall));
System\Reflection\Metadata\MetadataReader.cs (2)
1066public string GetString(NamespaceDefinitionHandle handle) 1135public NamespaceDefinition GetNamespaceDefinition(NamespaceDefinitionHandle handle)
System\Reflection\Metadata\MetadataStringComparer.cs (2)
73public bool Equals(NamespaceDefinitionHandle handle, string value) 78public bool Equals(NamespaceDefinitionHandle handle, string value, bool ignoreCase)
System\Reflection\Metadata\TypeSystem\ExportedType.cs (1)
61public NamespaceDefinitionHandle NamespaceDefinition
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (11)
2433public readonly struct NamespaceDefinitionHandle : IEquatable<NamespaceDefinitionHandle> 2454internal static NamespaceDefinitionHandle FromFullNameOffset(int stringHeapOffset) 2459internal static NamespaceDefinitionHandle FromVirtualIndex(uint virtualIndex) 2473public static implicit operator Handle(NamespaceDefinitionHandle handle) 2480public static explicit operator NamespaceDefinitionHandle(Handle handle) 2524return obj is NamespaceDefinitionHandle ndh && Equals(ndh); 2527public bool Equals(NamespaceDefinitionHandle other) 2537public static bool operator ==(NamespaceDefinitionHandle left, NamespaceDefinitionHandle right) 2542public static bool operator !=(NamespaceDefinitionHandle left, NamespaceDefinitionHandle right)
System\Reflection\Metadata\TypeSystem\NamespaceDefinition.cs (2)
31public NamespaceDefinitionHandle Parent 44public ImmutableArray<NamespaceDefinitionHandle> NamespaceDefinitions
System\Reflection\Metadata\TypeSystem\TypeDefinition.cs (2)
94public NamespaceDefinitionHandle NamespaceDefinition 277private NamespaceDefinitionHandle GetProjectedNamespace()
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (2)
47public static NamespaceDefinition GetNamespaceDefinition(this NamespaceDefinitionHandle handle, MetadataReader reader) => reader.GetNamespaceDefinition(handle); 52public static string GetString(this NamespaceDefinitionHandle handle, MetadataReader reader) => reader.GetString(handle);