5 instantiations of TypeHandle
System.Private.CoreLib (5)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
894return new(ElementType); 1124return new TypeHandle((void*)RuntimeTypeHandle.ToIntPtr(typeof(T).TypeHandle));
src\System\RuntimeHandles.cs (1)
52TypeHandle h = new((void*)handle);
src\System\RuntimeType.CoreCLR.cs (1)
2402return new TypeHandle((void*)m_handle);
src\System\TypedReference.CoreCLR.cs (1)
44TypeHandle typeHandle = new((void*)value._type);
53 references to TypeHandle
System.Private.CoreLib (53)
src\System\Array.CoreCLR.cs (9)
172TypeHandle srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle(); 173TypeHandle destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle(); 175if (TypeHandle.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions 249TypeHandle destTH = pDestArrayMT->GetArrayElementTypeHandle(); 291TypeHandle srcTH = pSrcArrayMT->GetArrayElementTypeHandle(); 473TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 515TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 553if (pElementMethodTable != TypeHandle.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object 686TypeHandle thElem = pArrayMT->GetArrayElementTypeHandle();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (15)
37TypeHandle elementTH = pMT->GetArrayElementTypeHandle(); 101TypeHandle th = targetTypeHandle.GetRuntimeType().GetNativeTypeHandle(); 886/// Gets a <see cref="TypeHandle"/> for the element type of the current type. 890public TypeHandle GetArrayElementTypeHandle() 1088/// Gets whether or not this <see cref="TypeHandle"/> wraps a <c>TypeDesc</c> pointer. 1122public static TypeHandle TypeHandleOf<T>() 1127public static bool AreSameType(TypeHandle left, TypeHandle right) => left.m_asTAddr == right.m_asTAddr; 1132public bool CanCastTo(TypeHandle destTH) 1146public static bool CanCastToForReflection(TypeHandle srcTH, TypeHandle destTH) 1160private static CastResult TryCanCastTo(TypeHandle srcTH, TypeHandle destTH) 1173private static bool CanCastToWorker(TypeHandle srcTH, TypeHandle destTH, bool nullableCast)
src\System\RuntimeHandles.cs (8)
52TypeHandle h = new((void*)handle); 456TypeHandle typeHandle = type.GetNativeTypeHandle(); 536TypeHandle typeHandle = type.GetNativeTypeHandle(); 557TypeHandle typeHandle = type.GetNativeTypeHandle(); 660TypeHandle th = type.GetNativeTypeHandle(); 676bool ret = TypeHandle.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle()); 691TypeHandle typeHandle = type.GetNativeTypeHandle(); 1659TypeHandle th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
40TypeHandle handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (17)
1754TypeHandle typeHandle = GetNativeTypeHandle(); 2400internal unsafe TypeHandle GetNativeTypeHandle() 3360TypeHandle th = GetNativeTypeHandle(); 3402TypeHandle th = GetNativeTypeHandle(); 3418TypeHandle th = GetNativeTypeHandle(); 3430TypeHandle th = GetNativeTypeHandle(); 3436bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3448TypeHandle th = GetNativeTypeHandle(); 3450bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3460TypeHandle th = GetNativeTypeHandle(); 3472TypeHandle th = GetNativeTypeHandle(); 3482TypeHandle th = GetNativeTypeHandle(); 3484bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<MulticastDelegate>().AsMethodTable(); 3493TypeHandle th = GetNativeTypeHandle(); 3505TypeHandle th = GetNativeTypeHandle(); 3517TypeHandle th = GetNativeTypeHandle(); 3670TypeHandle th = GetNativeTypeHandle();
src\System\StubHelpers.cs (1)
587internal TypeHandle m_Array;
src\System\TypedReference.CoreCLR.cs (2)
44TypeHandle typeHandle = new((void*)value._type); 56? TypeHandle.TypeHandleOf<UIntPtr>().AsMethodTable()