5 instantiations of TypeHandle
System.Private.CoreLib (5)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
1010return new(ElementType); 1265return new TypeHandle((void*)RuntimeTypeHandle.ToIntPtr(typeof(T).TypeHandle));
src\System\RuntimeHandles.cs (1)
52TypeHandle h = new((void*)handle);
src\System\RuntimeType.CoreCLR.cs (1)
2430return new TypeHandle((void*)m_handle);
src\System\TypedReference.CoreCLR.cs (1)
28TypeHandle typeHandle = new((void*)value._type);
53 references to TypeHandle
System.Private.CoreLib (53)
src\System\Array.CoreCLR.cs (7)
74TypeHandle srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle(); 75TypeHandle destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle(); 77if (TypeHandle.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions 151TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 193TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 231if (pElementMethodTable != TypeHandle.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object 327TypeHandle thElem = pArrayMT->GetArrayElementTypeHandle();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (15)
38TypeHandle elementTH = pMT->GetArrayElementTypeHandle(); 102TypeHandle th = targetTypeHandle.GetRuntimeType().GetNativeTypeHandle(); 1002/// Gets a <see cref="TypeHandle"/> for the element type of the current type. 1006public TypeHandle GetArrayElementTypeHandle() 1227/// Gets whether or not this <see cref="TypeHandle"/> wraps a <c>TypeDesc</c> pointer. 1263public static TypeHandle TypeHandleOf<T>() 1268public static bool AreSameType(TypeHandle left, TypeHandle right) => left.m_asTAddr == right.m_asTAddr; 1273public bool CanCastTo(TypeHandle destTH) 1287public static bool CanCastToForReflection(TypeHandle srcTH, TypeHandle destTH) 1301private static CastResult TryCanCastTo(TypeHandle srcTH, TypeHandle destTH) 1314private static bool CanCastToWorker(TypeHandle srcTH, TypeHandle destTH, bool nullableCast)
src\System\RuntimeHandles.cs (8)
52TypeHandle h = new((void*)handle); 475TypeHandle typeHandle = type.GetNativeTypeHandle(); 556TypeHandle typeHandle = type.GetNativeTypeHandle(); 578TypeHandle typeHandle = type.GetNativeTypeHandle(); 682TypeHandle th = type.GetNativeTypeHandle(); 698bool ret = TypeHandle.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle()); 713TypeHandle typeHandle = type.GetNativeTypeHandle(); 1716TypeHandle th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
41TypeHandle handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (18)
1782TypeHandle typeHandle = GetNativeTypeHandle(); 2428internal unsafe TypeHandle GetNativeTypeHandle() 3286TypeHandle th = GetNativeTypeHandle(); 3394TypeHandle th = GetNativeTypeHandle(); 3437TypeHandle th = GetNativeTypeHandle(); 3453TypeHandle th = GetNativeTypeHandle(); 3465TypeHandle th = GetNativeTypeHandle(); 3471bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3483TypeHandle th = GetNativeTypeHandle(); 3485bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3495TypeHandle th = GetNativeTypeHandle(); 3507TypeHandle th = GetNativeTypeHandle(); 3517TypeHandle th = GetNativeTypeHandle(); 3519bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<MulticastDelegate>().AsMethodTable(); 3528TypeHandle th = GetNativeTypeHandle(); 3540TypeHandle th = GetNativeTypeHandle(); 3552TypeHandle th = GetNativeTypeHandle(); 3703TypeHandle th = GetNativeTypeHandle();
src\System\String.CoreCLR.cs (1)
21return FastAllocateString(TypeHandle.TypeHandleOf<string>().AsMethodTable(), length);
src\System\StubHelpers.cs (1)
663internal TypeHandle m_Array;
src\System\TypedReference.CoreCLR.cs (2)
28TypeHandle typeHandle = new((void*)value._type); 40? TypeHandle.TypeHandleOf<UIntPtr>().AsMethodTable()