5 instantiations of TypeHandle
System.Private.CoreLib (5)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
933return new(ElementType); 1182return new TypeHandle((void*)RuntimeTypeHandle.ToIntPtr(typeof(T).TypeHandle));
src\System\RuntimeHandles.cs (1)
52TypeHandle h = new((void*)handle);
src\System\RuntimeType.CoreCLR.cs (1)
2429return 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 (7)
69TypeHandle srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle(); 70TypeHandle destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle(); 72if (TypeHandle.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions 146TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 188TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 226if (pElementMethodTable != TypeHandle.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object 321TypeHandle thElem = pArrayMT->GetArrayElementTypeHandle();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (15)
37TypeHandle elementTH = pMT->GetArrayElementTypeHandle(); 101TypeHandle th = targetTypeHandle.GetRuntimeType().GetNativeTypeHandle(); 925/// Gets a <see cref="TypeHandle"/> for the element type of the current type. 929public TypeHandle GetArrayElementTypeHandle() 1146/// Gets whether or not this <see cref="TypeHandle"/> wraps a <c>TypeDesc</c> pointer. 1180public static TypeHandle TypeHandleOf<T>() 1185public static bool AreSameType(TypeHandle left, TypeHandle right) => left.m_asTAddr == right.m_asTAddr; 1190public bool CanCastTo(TypeHandle destTH) 1204public static bool CanCastToForReflection(TypeHandle srcTH, TypeHandle destTH) 1218private static CastResult TryCanCastTo(TypeHandle srcTH, TypeHandle destTH) 1231private static bool CanCastToWorker(TypeHandle srcTH, TypeHandle destTH, bool nullableCast)
src\System\RuntimeHandles.cs (8)
52TypeHandle h = new((void*)handle); 465TypeHandle typeHandle = type.GetNativeTypeHandle(); 545TypeHandle typeHandle = type.GetNativeTypeHandle(); 566TypeHandle typeHandle = type.GetNativeTypeHandle(); 669TypeHandle th = type.GetNativeTypeHandle(); 685bool ret = TypeHandle.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle()); 700TypeHandle typeHandle = type.GetNativeTypeHandle(); 1665TypeHandle th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
40TypeHandle handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (18)
1781TypeHandle typeHandle = GetNativeTypeHandle(); 2427internal unsafe TypeHandle GetNativeTypeHandle() 3285TypeHandle th = GetNativeTypeHandle(); 3393TypeHandle th = GetNativeTypeHandle(); 3435TypeHandle th = GetNativeTypeHandle(); 3451TypeHandle th = GetNativeTypeHandle(); 3463TypeHandle th = GetNativeTypeHandle(); 3469bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3481TypeHandle th = GetNativeTypeHandle(); 3483bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3493TypeHandle th = GetNativeTypeHandle(); 3505TypeHandle th = GetNativeTypeHandle(); 3515TypeHandle th = GetNativeTypeHandle(); 3517bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<MulticastDelegate>().AsMethodTable(); 3526TypeHandle th = GetNativeTypeHandle(); 3538TypeHandle th = GetNativeTypeHandle(); 3550TypeHandle th = GetNativeTypeHandle(); 3701TypeHandle th = GetNativeTypeHandle();
src\System\String.CoreCLR.cs (1)
33return FastAllocateString(TypeHandle.TypeHandleOf<string>().AsMethodTable(), length);
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()