4 instantiations of TypeHandle
System.Private.CoreLib (4)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
894
return
new
(ElementType);
1096
return new
TypeHandle
((void*)RuntimeTypeHandle.ToIntPtr(typeof(T).TypeHandle));
src\System\RuntimeType.CoreCLR.cs (1)
2421
return new
TypeHandle
((void*)m_handle);
src\System\TypedReference.CoreCLR.cs (1)
44
TypeHandle typeHandle =
new
((void*)value._type);
52 references to TypeHandle
System.Private.CoreLib (52)
src\System\Array.CoreCLR.cs (9)
158
TypeHandle
srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle();
159
TypeHandle
destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle();
161
if (
TypeHandle
.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions
235
TypeHandle
destTH = pDestArrayMT->GetArrayElementTypeHandle();
277
TypeHandle
srcTH = pSrcArrayMT->GetArrayElementTypeHandle();
459
TypeHandle
arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle();
501
TypeHandle
arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle();
539
if (pElementMethodTable !=
TypeHandle
.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object
672
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()
1072
/// Gets whether or not this <see cref="
TypeHandle
"/> wraps a <c>TypeDesc</c> pointer.
1094
public static
TypeHandle
TypeHandleOf<T>()
1099
public static bool AreSameType(
TypeHandle
left,
TypeHandle
right) => left.m_asTAddr == right.m_asTAddr;
1104
public bool CanCastTo(
TypeHandle
destTH)
1118
public static bool CanCastToForReflection(
TypeHandle
srcTH,
TypeHandle
destTH)
1132
private static CastResult TryCanCastTo(
TypeHandle
srcTH,
TypeHandle
destTH)
1145
private static bool CanCastToWorker(
TypeHandle
srcTH,
TypeHandle
destTH, bool nullableCast)
src\System\RuntimeHandles.cs (7)
444
TypeHandle
typeHandle = type.GetNativeTypeHandle();
524
TypeHandle
typeHandle = type.GetNativeTypeHandle();
545
TypeHandle
typeHandle = type.GetNativeTypeHandle();
648
TypeHandle
th = type.GetNativeTypeHandle();
664
bool ret =
TypeHandle
.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle());
679
TypeHandle
typeHandle = type.GetNativeTypeHandle();
1633
TypeHandle
th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
40
TypeHandle
handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (17)
1773
TypeHandle
typeHandle = GetNativeTypeHandle();
2419
internal unsafe
TypeHandle
GetNativeTypeHandle()
3379
TypeHandle
th = GetNativeTypeHandle();
3420
TypeHandle
th = GetNativeTypeHandle();
3436
TypeHandle
th = GetNativeTypeHandle();
3448
TypeHandle
th = GetNativeTypeHandle();
3454
bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<Enum>().AsMethodTable();
3466
TypeHandle
th = GetNativeTypeHandle();
3468
bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<Enum>().AsMethodTable();
3478
TypeHandle
th = GetNativeTypeHandle();
3490
TypeHandle
th = GetNativeTypeHandle();
3500
TypeHandle
th = GetNativeTypeHandle();
3502
bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<MulticastDelegate>().AsMethodTable();
3511
TypeHandle
th = GetNativeTypeHandle();
3523
TypeHandle
th = GetNativeTypeHandle();
3535
TypeHandle
th = GetNativeTypeHandle();
3688
TypeHandle
th = GetNativeTypeHandle();
src\System\StubHelpers.cs (1)
586
internal
TypeHandle
m_Array;
src\System\TypedReference.CoreCLR.cs (2)
44
TypeHandle
typeHandle = new((void*)value._type);
56
?
TypeHandle
.TypeHandleOf<UIntPtr>().AsMethodTable()