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