43 instantiations of Handle
System.Private.CoreLib (39)
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\BlobReader.cs (1)
71Handle handle = new Handle((HandleType)(value & 0x7f), (int)(value >> 7));
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\MdBinaryReader.cs (1)
49handle = new Handle((HandleType)(rawValue & 0x7F), (int)(rawValue >> 7));
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\NativeFormatReaderGen.cs (35)
96=> new Handle(handle._value); 177=> new Handle(handle._value); 261=> new Handle(handle._value); 341=> new Handle(handle._value); 423=> new Handle(handle._value); 508=> new Handle(handle._value); 605=> new Handle(handle._value); 705=> new Handle(handle._value); 786=> new Handle(handle._value); 866=> new Handle(handle._value); 967=> new Handle(handle._value); 1057=> new Handle(handle._value); 1161=> new Handle(handle._value); 1247=> new Handle(handle._value); 1331=> new Handle(handle._value); 1430=> new Handle(handle._value); 1510=> new Handle(handle._value); 1600=> new Handle(handle._value); 1684=> new Handle(handle._value); 1768=> new Handle(handle._value); 1864=> new Handle(handle._value); 1945=> new Handle(handle._value); 2045=> new Handle(handle._value); 2135=> new Handle(handle._value); 2219=> new Handle(handle._value); 2303=> new Handle(handle._value); 2384=> new Handle(handle._value); 2524=> new Handle(handle._value); 2632=> new Handle(handle._value); 2767=> new Handle(handle._value); 2855=> new Handle(handle._value); 2941=> new Handle(handle._value); 3026=> new Handle(handle._value); 3107=> new Handle(handle._value); 3187=> new Handle(handle._value);
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\NativeMetadataReader.cs (2)
120public static Handle FromIntToken(int value) => new Handle(value); 191return new Handle(((int)HandleType.Null) << 25);
System.Private.StackTraceMetadata (4)
Internal\StackTraceMetadata\StackTraceMetadata.cs (4)
480currentName = new Handle(HandleType.ConstantStringValue, (int)NativePrimitiveDecoder.DecodeUnsigned(ref pCurrent)).ToConstantStringValueHandle(Reader); 485currentSignature = new Handle(HandleType.MethodSignature, (int)NativePrimitiveDecoder.DecodeUnsigned(ref pCurrent)).ToMethodSignatureHandle(Reader); 491currentSignature = new Handle(HandleType.MethodSignature, (int)NativePrimitiveDecoder.DecodeUnsigned(ref pCurrent)).ToMethodSignatureHandle(Reader); 492currentMethodInst = new Handle(HandleType.ConstantStringArray, (int)NativePrimitiveDecoder.DecodeUnsigned(ref pCurrent)).ToConstantStringArrayHandle(Reader);
311 references to Handle
System.Private.CoreLib (279)
Internal\Runtime\CompilerServices\MethodNameAndSignature.cs (2)
63Handle returnType = method.Signature.GetMethodSignature(Reader).ReturnType; 66Handle inner = returnType.ToTypeSpecificationHandle(Reader).GetTypeSpecification(Reader).Signature;
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\BlobReader.cs (2)
68public Handle ReadTypeHandle() 71Handle handle = new Handle((HandleType)(value & 0x7f), (int)(value >> 7));
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\MdBinaryReader.cs (1)
45public static uint Read(this NativeReader reader, uint offset, out Handle handle)
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\NativeFormatReaderGen.cs (216)
47public Handle ElementType => _elementType; 48private readonly Handle _elementType; 67internal ArraySignatureHandle(Handle handle) : this(handle._value) 83else if (obj is Handle) 84return _value == ((Handle)obj)._value; 91public bool Equals(Handle handle) => _value == handle._value; 95public static implicit operator Handle(ArraySignatureHandle handle) 137public Handle Type => _type; 138private readonly Handle _type; 148internal ByReferenceSignatureHandle(Handle handle) : this(handle._value) 164else if (obj is Handle) 165return _value == ((Handle)obj)._value; 172public bool Equals(Handle handle) => _value == handle._value; 176public static implicit operator Handle(ByReferenceSignatureHandle handle) 232internal ConstantHandle(Handle handle) : this(handle._value) 248else if (obj is Handle) 249return _value == ((Handle)obj)._value; 256public bool Equals(Handle handle) => _value == handle._value; 260public static implicit operator Handle(ConstantHandle handle) 312internal ConstantStringArrayHandle(Handle handle) : this(handle._value) 328else if (obj is Handle) 329return _value == ((Handle)obj)._value; 336public bool Equals(Handle handle) => _value == handle._value; 340public static implicit operator Handle(ConstantStringArrayHandle handle) 394internal ConstantStringValueHandle(Handle handle) : this(handle._value) 410else if (obj is Handle) 411return _value == ((Handle)obj)._value; 418public bool Equals(Handle handle) => _value == handle._value; 422public static implicit operator Handle(ConstantStringValueHandle handle) 465public Handle Constructor => _constructor; 466private readonly Handle _constructor; 479internal CustomAttributeHandle(Handle handle) : this(handle._value) 495else if (obj is Handle) 496return _value == ((Handle)obj)._value; 503public bool Equals(Handle handle) => _value == handle._value; 507public static implicit operator Handle(CustomAttributeHandle handle) 559public Handle Type => _type; 560private readonly Handle _type; 576internal EventHandle(Handle handle) : this(handle._value) 592else if (obj is Handle) 593return _value == ((Handle)obj)._value; 600public bool Equals(Handle handle) => _value == handle._value; 604public static implicit operator Handle(EventHandle handle) 676internal FieldHandle(Handle handle) : this(handle._value) 692else if (obj is Handle) 693return _value == ((Handle)obj)._value; 700public bool Equals(Handle handle) => _value == handle._value; 704public static implicit operator Handle(FieldHandle handle) 746public Handle Type => _type; 747private readonly Handle _type; 757internal FieldSignatureHandle(Handle handle) : this(handle._value) 773else if (obj is Handle) 774return _value == ((Handle)obj)._value; 781public bool Equals(Handle handle) => _value == handle._value; 785public static implicit operator Handle(FieldSignatureHandle handle) 837internal FunctionPointerSignatureHandle(Handle handle) : this(handle._value) 853else if (obj is Handle) 854return _value == ((Handle)obj)._value; 861public bool Equals(Handle handle) => _value == handle._value; 865public static implicit operator Handle(FunctionPointerSignatureHandle handle) 938internal GenericParameterHandle(Handle handle) : this(handle._value) 954else if (obj is Handle) 955return _value == ((Handle)obj)._value; 962public bool Equals(Handle handle) => _value == handle._value; 966public static implicit operator Handle(GenericParameterHandle handle) 1010public Handle Parent => _parent; 1011private readonly Handle _parent; 1017public Handle Signature => _signature; 1018private readonly Handle _signature; 1028internal MemberReferenceHandle(Handle handle) : this(handle._value) 1044else if (obj is Handle) 1045return _value == ((Handle)obj)._value; 1052public bool Equals(Handle handle) => _value == handle._value; 1056public static implicit operator Handle(MemberReferenceHandle handle) 1132internal MethodHandle(Handle handle) : this(handle._value) 1148else if (obj is Handle) 1149return _value == ((Handle)obj)._value; 1156public bool Equals(Handle handle) => _value == handle._value; 1160public static implicit operator Handle(MethodHandle handle) 1203public Handle Method => _method; 1204private readonly Handle _method; 1218internal MethodInstantiationHandle(Handle handle) : this(handle._value) 1234else if (obj is Handle) 1235return _value == ((Handle)obj)._value; 1242public bool Equals(Handle handle) => _value == handle._value; 1246public static implicit operator Handle(MethodInstantiationHandle handle) 1302internal MethodSemanticsHandle(Handle handle) : this(handle._value) 1318else if (obj is Handle) 1319return _value == ((Handle)obj)._value; 1326public bool Equals(Handle handle) => _value == handle._value; 1330public static implicit operator Handle(MethodSemanticsHandle handle) 1382public Handle ReturnType => _returnType; 1383private readonly Handle _returnType; 1401internal MethodSignatureHandle(Handle handle) : this(handle._value) 1417else if (obj is Handle) 1418return _value == ((Handle)obj)._value; 1425public bool Equals(Handle handle) => _value == handle._value; 1429public static implicit operator Handle(MethodSignatureHandle handle) 1481internal MethodTypeVariableSignatureHandle(Handle handle) : this(handle._value) 1497else if (obj is Handle) 1498return _value == ((Handle)obj)._value; 1505public bool Equals(Handle handle) => _value == handle._value; 1509public static implicit operator Handle(MethodTypeVariableSignatureHandle handle) 1556public Handle ModifierType => _modifierType; 1557private readonly Handle _modifierType; 1560public Handle Type => _type; 1561private readonly Handle _type; 1571internal ModifiedTypeHandle(Handle handle) : this(handle._value) 1587else if (obj is Handle) 1588return _value == ((Handle)obj)._value; 1595public bool Equals(Handle handle) => _value == handle._value; 1599public static implicit operator Handle(ModifiedTypeHandle handle) 1655internal NamespaceDefinitionHandle(Handle handle) : this(handle._value) 1671else if (obj is Handle) 1672return _value == ((Handle)obj)._value; 1679public bool Equals(Handle handle) => _value == handle._value; 1683public static implicit operator Handle(NamespaceDefinitionHandle handle) 1739internal NamespaceReferenceHandle(Handle handle) : this(handle._value) 1755else if (obj is Handle) 1756return _value == ((Handle)obj)._value; 1763public bool Equals(Handle handle) => _value == handle._value; 1767public static implicit operator Handle(NamespaceReferenceHandle handle) 1835internal ParameterHandle(Handle handle) : this(handle._value) 1851else if (obj is Handle) 1852return _value == ((Handle)obj)._value; 1859public bool Equals(Handle handle) => _value == handle._value; 1863public static implicit operator Handle(ParameterHandle handle) 1905public Handle Type => _type; 1906private readonly Handle _type; 1916internal PointerSignatureHandle(Handle handle) : this(handle._value) 1932else if (obj is Handle) 1933return _value == ((Handle)obj)._value; 1940public bool Equals(Handle handle) => _value == handle._value; 1944public static implicit operator Handle(PointerSignatureHandle handle) 2016internal PropertyHandle(Handle handle) : this(handle._value) 2032else if (obj is Handle) 2033return _value == ((Handle)obj)._value; 2040public bool Equals(Handle handle) => _value == handle._value; 2044public static implicit operator Handle(PropertyHandle handle) 2091public Handle Type => _type; 2092private readonly Handle _type; 2106internal PropertySignatureHandle(Handle handle) : this(handle._value) 2122else if (obj is Handle) 2123return _value == ((Handle)obj)._value; 2130public bool Equals(Handle handle) => _value == handle._value; 2134public static implicit operator Handle(PropertySignatureHandle handle) 2190internal QualifiedFieldHandle(Handle handle) : this(handle._value) 2206else if (obj is Handle) 2207return _value == ((Handle)obj)._value; 2214public bool Equals(Handle handle) => _value == handle._value; 2218public static implicit operator Handle(QualifiedFieldHandle handle) 2274internal QualifiedMethodHandle(Handle handle) : this(handle._value) 2290else if (obj is Handle) 2291return _value == ((Handle)obj)._value; 2298public bool Equals(Handle handle) => _value == handle._value; 2302public static implicit operator Handle(QualifiedMethodHandle handle) 2344public Handle ElementType => _elementType; 2345private readonly Handle _elementType; 2355internal SZArraySignatureHandle(Handle handle) : this(handle._value) 2371else if (obj is Handle) 2372return _value == ((Handle)obj)._value; 2379public bool Equals(Handle handle) => _value == handle._value; 2383public static implicit operator Handle(SZArraySignatureHandle handle) 2495internal ScopeDefinitionHandle(Handle handle) : this(handle._value) 2511else if (obj is Handle) 2512return _value == ((Handle)obj)._value; 2519public bool Equals(Handle handle) => _value == handle._value; 2523public static implicit operator Handle(ScopeDefinitionHandle handle) 2603internal ScopeReferenceHandle(Handle handle) : this(handle._value) 2619else if (obj is Handle) 2620return _value == ((Handle)obj)._value; 2627public bool Equals(Handle handle) => _value == handle._value; 2631public static implicit operator Handle(ScopeReferenceHandle handle) 2689public Handle BaseType => _baseType; 2690private readonly Handle _baseType; 2693public Handle NamespaceOrEnclosingType => _namespaceOrEnclosingType; 2694private readonly Handle _namespaceOrEnclosingType; 2738internal TypeDefinitionHandle(Handle handle) : this(handle._value) 2754else if (obj is Handle) 2755return _value == ((Handle)obj)._value; 2762public bool Equals(Handle handle) => _value == handle._value; 2766public static implicit operator Handle(TypeDefinitionHandle handle) 2826internal TypeForwarderHandle(Handle handle) : this(handle._value) 2842else if (obj is Handle) 2843return _value == ((Handle)obj)._value; 2850public bool Equals(Handle handle) => _value == handle._value; 2854public static implicit operator Handle(TypeForwarderHandle handle) 2897public Handle GenericType => _genericType; 2898private readonly Handle _genericType; 2912internal TypeInstantiationSignatureHandle(Handle handle) : this(handle._value) 2928else if (obj is Handle) 2929return _value == ((Handle)obj)._value; 2936public bool Equals(Handle handle) => _value == handle._value; 2940public static implicit operator Handle(TypeInstantiationSignatureHandle handle) 2983public Handle NamespaceOrEnclosingType => _namespaceOrEnclosingType; 2984private readonly Handle _namespaceOrEnclosingType; 2997internal TypeReferenceHandle(Handle handle) : this(handle._value) 3013else if (obj is Handle) 3014return _value == ((Handle)obj)._value; 3021public bool Equals(Handle handle) => _value == handle._value; 3025public static implicit operator Handle(TypeReferenceHandle handle) 3067public Handle Signature => _signature; 3068private readonly Handle _signature; 3078internal TypeSpecificationHandle(Handle handle) : this(handle._value) 3094else if (obj is Handle) 3095return _value == ((Handle)obj)._value; 3102public bool Equals(Handle handle) => _value == handle._value; 3106public static implicit operator Handle(TypeSpecificationHandle handle) 3158internal TypeVariableSignatureHandle(Handle handle) : this(handle._value) 3174else if (obj is Handle) 3175return _value == ((Handle)obj)._value; 3182public bool Equals(Handle handle) => _value == handle._value; 3186public static implicit operator Handle(TypeVariableSignatureHandle handle) 4550private Handle _current; 4556_current = default(Handle); 4559public Handle Current
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\NativeMetadataReader.cs (8)
69if (obj is Handle) 70return _value == ((Handle)obj)._value; 75public bool Equals(Handle handle) 120public static Handle FromIntToken(int value) => new Handle(value); 187public Handle NullHandle 198public bool IsNull(Handle handle) 208public Handle ToHandle(Handle handle)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeCustomAttributeData.cs (1)
898Handle handle = blob.ReadTypeHandle();
System\Reflection\ModifiedType.NativeAot.cs (8)
18internal readonly Handle Handle; 19public TypeSignature(MetadataReader reader, Handle handle) 29Handle handle = _typeSignature.Handle; 63foreach (Handle paramHandle in functionSig.Parameters) 73foreach (Handle paramHandle in typeInst.GenericTypeArguments) 90Handle fnPtrTypeSigHandle = reader.GetTypeSpecification( 109Handle handle = _typeSignature.Handle; 136public static Type Create(Type unmodifiedType, MetadataReader reader, Handle typeSignature)
System\Reflection\Runtime\Assemblies\NativeFormat\NativeFormatRuntimeAssembly.GetTypeCore.CaseInsensitive.cs (1)
26Handle typeDefOrForwarderHandle = qualifiedHandle.Handle;
System\Reflection\Runtime\FieldInfos\NativeFormat\NativeFormatRuntimeFieldInfo.cs (1)
165private Handle FieldTypeHandle => _field.Signature.GetFieldSignature(_reader).Type;
System\Reflection\Runtime\General\MetadataReaderExtensions.cs (7)
25public static unsafe Handle AsHandle(this int token) 27return *(Handle*)&token; 35public static unsafe Handle AsHandle(this uint token) 37return *(Handle*)&token; 45public static unsafe int AsInt(this Handle handle) 63public static bool IsTypeDefRefOrSpecHandle(this Handle handle, MetadataReader reader) 71public static bool IsTypeDefRefSpecOrModifiedTypeHandle(this Handle handle, MetadataReader reader)
System\Reflection\Runtime\General\MetadataReaderExtensions.NativeFormat.cs (8)
47internal static Type[] GetCustomModifiers(this Handle handle, MetadataReader reader, TypeContext typeContext, bool optional) 72public static Handle SkipCustomModifiers(this Handle handle, MetadataReader reader) 90public static MethodSignature ParseMethodSignature(this Handle handle, MetadataReader reader) 141public static Handle GetAttributeTypeHandle(this CustomAttribute customAttribute, 166Handle typeHandle = customAttributeHandle.GetCustomAttribute(reader).GetAttributeTypeHandle(reader); 173Handle namespaceOrEnclosingType = typeDefinition.NamespaceOrEnclosingType; 184Handle namespaceOrEnclosingType = typeReference.NamespaceOrEnclosingType;
System\Reflection\Runtime\General\QHandles.cs (3)
68public QHandle(MetadataReader reader, Handle handle) 75public Handle Handle { get { return _handle; } } 99private readonly Handle _handle;
System\Reflection\Runtime\General\QHandles.NativeFormat.cs (3)
22_handle = ((Handle)handle).AsInt(); 42_handle = ((Handle)handle).AsInt(); 59public QTypeDefRefOrSpec(MetadataReader reader, Handle handle, bool skipCheck = false)
System\Reflection\Runtime\General\QSignatureTypeHandle.cs (1)
24private global::Internal.Metadata.NativeFormat.Handle _handle;
System\Reflection\Runtime\General\QSignatureTypeHandle.NativeFormat.cs (1)
19public QSignatureTypeHandle(MetadataReader reader, Handle handle, bool skipCheck = false)
System\Reflection\Runtime\General\TypeResolver.cs (1)
26return global::Internal.Metadata.NativeFormat.Handle.FromIntToken(typeDefOrRefOrSpec.Handle).TryResolve((global::Internal.Metadata.NativeFormat.MetadataReader)typeDefOrRefOrSpec.Reader, typeContext, ref exception);
System\Reflection\Runtime\General\TypeResolver.NativeFormat.cs (6)
21internal static RuntimeTypeInfo Resolve(this Handle typeDefRefOrSpec, MetadataReader reader, TypeContext typeContext) 30internal static RuntimeTypeInfo? TryResolve(this Handle typeDefRefOrSpec, MetadataReader reader, TypeContext typeContext, ref Exception? exception) 62Handle typeHandle = typeSpecHandle.GetTypeSpecification(reader).Signature; 110foreach (Handle paramTypeHandle in methodSig.Parameters) 142foreach (Handle genericTypeArgumentHandle in sig.GenericTypeArguments) 175Handle parent = typeReference.NamespaceOrEnclosingType;
System\Reflection\Runtime\MethodInfos\NativeFormat\NativeFormatMethodCommon.cs (1)
39foreach (Handle parameterTypeSignatureHandle in methodSignature.Parameters)
System\Reflection\Runtime\PropertyInfos\NativeFormat\NativeFormatRuntimePropertyInfo.cs (1)
131foreach (Handle parameterType in _property.Signature.GetPropertySignature(_reader).Parameters)
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeGenericParameterTypeInfo.cs (1)
72foreach (Handle constraintHandle in _genericParameter.Constraints)
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeNamedTypeInfo.cs (4)
182Handle namespaceOrEnclosingType = _typeDefinition.NamespaceOrEnclosingType; 292Handle baseType = _typeDefinition.BaseType; 308foreach (Handle ifcHandle in _typeDefinition.Interfaces) 385Handle namespaceOrEnclosingType = _typeDefinition.NamespaceOrEnclosingType;
System\Reflection\RuntimeCustomAttributeData.NativeAot.cs (2)
108foreach (Handle parameterHandle in signatureParameters) 175Handle attributeTypeHandle = customAttribute.GetAttributeTypeHandle(reader);
System.Private.StackTraceMetadata (24)
Internal\StackTraceMetadata\MethodNameFormatter.cs (15)
47public static string FormatReflectionNotationTypeName(MetadataReader metadataReader, Handle type) 54public static (string, string, string, string) FormatMethodName(MetadataReader metadataReader, Handle owningType, ConstantStringValueHandle name, MethodSignatureHandle signature, ConstantStringArrayHandle genericArguments) 143foreach (Handle type in typeVector) 173foreach (Handle handle in typeVector) 190private void EmitTypeName(Handle typeHandle, Flags flags) 301Handle namespaceOrEnclosingType = typeDef.NamespaceOrEnclosingType; 420public static Handle GetHandleAt(HandleCollection collection, int index) 424foreach (var currentArg in collection) 432return default(Handle); 435public static Handle GetHandleAt(GenericParameterHandleCollection collection, int index) 447return default(Handle); 450public Handle GetTypeVariable(int index) 457public Handle GetMethodVariable(int index) 476private static object GetTypeContext(MetadataReader metadataReader, Handle handle) 510public static SigTypeContext FromMethod(MetadataReader metadataReader, Handle enclosingTypeHandle, ConstantStringArrayHandle methodInst)
Internal\StackTraceMetadata\StackTraceMetadata.cs (9)
76hashCodeForLineInfo = (int)VersionResilientHashCode.CombineThreeValuesIntoHash((uint)data.OwningType.ToIntToken(), (uint)((Handle)data.Name).ToIntToken(), (uint)((Handle)data.Signature).ToIntToken()); 112hashCodeForLineInfo = (int)VersionResilientHashCode.CombineTwoValuesIntoHash((uint)((Handle)typeHandle).ToIntToken(), (uint)((Handle)methodHandle).ToIntToken()); 236private static DiagnosticMethodInfo CreateDiagnosticMethodInfo(MetadataReader reader, Handle owningType, ConstantStringValueHandle name) 249private static string FormatAssemblyName(MetadataReader reader, Handle handle) 460Handle currentOwningType = default; 473currentOwningType = Handle.FromIntToken((int)NativePrimitiveDecoder.ReadUInt32(ref pCurrent)); 597public Handle OwningType { get; init; }
System.Private.TypeLoader (8)
Internal\Runtime\TypeLoader\MetadataNameExtensions.cs (3)
12private static string GetFullName(this Handle handle, MetadataReader reader) 30Handle parent = typeDef.NamespaceOrEnclosingType; 54Handle currentHandle = typeDef.NamespaceOrEnclosingType;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.FieldAccess.cs (1)
85Handle entryFieldHandle = (((int)HandleType.Field << 25) | (int)entryParser.GetUnsigned()).AsHandle();
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.Metadata.cs (2)
97Handle entryMetadataHandle = entryParser.GetUnsigned().AsHandle(); 640Handle entryMethodHandle = (((uint)HandleType.Method << 25) | entryParser.GetUnsigned()).AsHandle();
src\runtime\src\coreclr\tools\Common\Internal\Metadata\NativeFormat\MetadataTypeHashingAlgorithms.cs (2)
14Handle namespaceOrEnclosingType = typeDef.NamespaceOrEnclosingType; 39Handle namespaceOrEnclosingType = typeRef.NamespaceOrEnclosingType;