5 instantiations of TypeHandle
System.Private.CoreLib (5)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
997
return
new
(ElementType);
1247
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)
2429
return new
TypeHandle
((void*)m_handle);
src\System\TypedReference.CoreCLR.cs (1)
28
TypeHandle typeHandle =
new
((void*)value._type);
53 references to TypeHandle
System.Private.CoreLib (53)
src\System\Array.CoreCLR.cs (7)
69
TypeHandle
srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle();
70
TypeHandle
destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle();
72
if (
TypeHandle
.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions
146
TypeHandle
arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle();
188
TypeHandle
arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle();
226
if (pElementMethodTable !=
TypeHandle
.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object
321
TypeHandle
thElem = pArrayMT->GetArrayElementTypeHandle();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (15)
38
TypeHandle
elementTH = pMT->GetArrayElementTypeHandle();
102
TypeHandle
th = targetTypeHandle.GetRuntimeType().GetNativeTypeHandle();
989
/// Gets a <see cref="
TypeHandle
"/> for the element type of the current type.
993
public
TypeHandle
GetArrayElementTypeHandle()
1211
/// Gets whether or not this <see cref="
TypeHandle
"/> wraps a <c>TypeDesc</c> pointer.
1245
public static
TypeHandle
TypeHandleOf<T>()
1250
public static bool AreSameType(
TypeHandle
left,
TypeHandle
right) => left.m_asTAddr == right.m_asTAddr;
1255
public bool CanCastTo(
TypeHandle
destTH)
1269
public static bool CanCastToForReflection(
TypeHandle
srcTH,
TypeHandle
destTH)
1283
private static CastResult TryCanCastTo(
TypeHandle
srcTH,
TypeHandle
destTH)
1296
private static bool CanCastToWorker(
TypeHandle
srcTH,
TypeHandle
destTH, bool nullableCast)
src\System\RuntimeHandles.cs (8)
52
TypeHandle
h = new((void*)handle);
465
TypeHandle
typeHandle = type.GetNativeTypeHandle();
545
TypeHandle
typeHandle = type.GetNativeTypeHandle();
566
TypeHandle
typeHandle = type.GetNativeTypeHandle();
669
TypeHandle
th = type.GetNativeTypeHandle();
685
bool ret =
TypeHandle
.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle());
700
TypeHandle
typeHandle = type.GetNativeTypeHandle();
1691
TypeHandle
th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
41
TypeHandle
handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (19)
1781
TypeHandle
typeHandle = GetNativeTypeHandle();
2427
internal unsafe
TypeHandle
GetNativeTypeHandle()
3285
TypeHandle
th = GetNativeTypeHandle();
3393
TypeHandle
th = GetNativeTypeHandle();
3435
TypeHandle
th = GetNativeTypeHandle();
3451
TypeHandle
th = GetNativeTypeHandle();
3463
TypeHandle
th = GetNativeTypeHandle();
3469
bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<Enum>().AsMethodTable();
3481
TypeHandle
th = GetNativeTypeHandle();
3483
bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<Enum>().AsMethodTable();
3493
TypeHandle
th = GetNativeTypeHandle();
3505
TypeHandle
th = GetNativeTypeHandle();
3515
TypeHandle
th = GetNativeTypeHandle();
3517
bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.
TypeHandle
.TypeHandleOf<MulticastDelegate>().AsMethodTable();
3526
TypeHandle
th = GetNativeTypeHandle();
3538
TypeHandle
th = GetNativeTypeHandle();
3550
TypeHandle
th = GetNativeTypeHandle();
3595
TypeHandle
th = GetNativeTypeHandle();
3726
TypeHandle
th = GetNativeTypeHandle();
src\System\String.CoreCLR.cs (1)
22
return FastAllocateString(
TypeHandle
.TypeHandleOf<string>().AsMethodTable(), length);
src\System\TypedReference.CoreCLR.cs (2)
28
TypeHandle
typeHandle = new((void*)value._type);
40
?
TypeHandle
.TypeHandleOf<UIntPtr>().AsMethodTable()