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