102 references to ToMethodTable
System.Private.CoreLib (102)
Internal\IntrinsicSupport\ComparerHelpers.cs (2)
21
MethodTable* objectType = t.
ToMethodTable
();
22
MethodTable* icomparableType = typeof(IComparable<>).TypeHandle.
ToMethodTable
();
Internal\IntrinsicSupport\EqualityComparerHelpers.cs (4)
24
MethodTable* objectType = t.
ToMethodTable
();
25
MethodTable* iequatableType = typeof(IEquatable<>).TypeHandle.
ToMethodTable
();
51
return t.
ToMethodTable
()->IsEnum;
56
return t.
ToMethodTable
()->IsString;
Internal\Reflection\Augments\ReflectionAugments.cs (1)
57
eeType = underlyingType.TypeHandle.
ToMethodTable
();
Internal\Runtime\Augments\RuntimeAugments.cs (64)
71
return RuntimeImports.RhNewObject(typeHandle.
ToMethodTable
());
94
Debug.Assert(typeHandleForArrayType.
ToMethodTable
()->IsSzArray);
96
MethodTable* mt = typeHandleForArrayType.
ToMethodTable
();
131
Type elementType = Type.GetTypeFromHandle(new RuntimeTypeHandle(typeHandleForArrayType.
ToMethodTable
()->RelatedParameterType))!;
140
return Array.NewMultiDimArray(typeHandleForArrayType.
ToMethodTable
(), pImmutableLengths, lengths.Length);
171
return RuntimeImports.RhGetNewObjectHelper(type.
ToMethodTable
());
184
return Delegate.CreateDelegate(typeHandleForDelegate.
ToMethodTable
(), ldftnResult, thisObject, isStatic: isStatic, isOpen: isOpen);
219
return (IntPtr)typeHandle.
ToMethodTable
();
224
return typeHandle.
ToMethodTable
()->TypeManager;
234
RuntimeImports.RhUnbox(fieldValue, ref *(byte*)address, fieldType.
ToMethodTable
());
239
return RuntimeExports.RhBox(fieldType.
ToMethodTable
(), ref *(byte*)address);
244
if (fieldType.
ToMethodTable
()->IsFunctionPointer)
253
RuntimeImports.RhUnbox(fieldValue, ref address, fieldType.
ToMethodTable
());
259
return RuntimeExports.RhBox(fieldType.
ToMethodTable
(), ref address);
266
if (fieldType.
ToMethodTable
()->IsFunctionPointer)
297
Debug.Assert(TypedReference.TargetTypeToken(typedReference).
ToMethodTable
()->IsValueType);
299
RuntimeImports.RhUnbox(fieldValue, ref Unsafe.Add<byte>(ref typedReference.Value, fieldOffset), fieldTypeHandle.
ToMethodTable
());
305
Debug.Assert(TypedReference.TargetTypeToken(typedReference).
ToMethodTable
()->IsValueType);
306
Debug.Assert(fieldTypeHandle.
ToMethodTable
()->IsValueType);
308
return RuntimeExports.RhBox(fieldTypeHandle.
ToMethodTable
(), ref Unsafe.Add<byte>(ref typedReference.Value, fieldOffset));
314
Debug.Assert(TypedReference.TargetTypeToken(typedReference).
ToMethodTable
()->IsValueType);
322
Debug.Assert(TypedReference.TargetTypeToken(typedReference).
ToMethodTable
()->IsValueType);
330
Debug.Assert(TypedReference.TargetTypeToken(typedReference).
ToMethodTable
()->IsValueType);
333
if (fieldTypeHandle.
ToMethodTable
()->IsFunctionPointer)
360
Debug.Assert(enumTypeHandle.
ToMethodTable
()->IsEnum);
362
EETypeElementType elementType = enumTypeHandle.
ToMethodTable
()->ElementType;
392
MethodTable* elementType = parameterTypeHandle.
ToMethodTable
()->RelatedParameterType;
399
return arrayHandle.
ToMethodTable
()->IsSzArray ? -1 : arrayHandle.
ToMethodTable
()->ArrayRank;
404
return type.
ToMethodTable
()->IsValueType;
409
return type.
ToMethodTable
()->IsInterface;
414
return RuntimeExports.RhBox(type.
ToMethodTable
(), ref *(byte*)address);
438
MethodTable* dstEEType = dstType.
ToMethodTable
();
439
MethodTable* srcEEType = srcType.
ToMethodTable
();
452
MethodTable* eeType = typeHandle.
ToMethodTable
();
464
return RuntimeImports.RhGetGCDescSize(typeHandle.
ToMethodTable
());
469
return typeHandle.
ToMethodTable
()->NumInterfaces;
474
return new RuntimeTypeHandle(typeHandle.
ToMethodTable
()->InterfaceMap[index]);
479
IntPtr cell = RuntimeImports.RhNewInterfaceDispatchCell(interfaceTypeHandle.
ToMethodTable
(), slotNumber);
494
MethodTable* eeType = typeHandle.
ToMethodTable
();
501
MethodTable* eeType = typeHandle.
ToMethodTable
();
508
MethodTable* eeType = typeHandle.
ToMethodTable
();
524
return typeHandle.
ToMethodTable
()->IsGeneric;
529
return typeHandle.
ToMethodTable
()->IsArray;
532
public static bool IsByRefLike(RuntimeTypeHandle typeHandle) => typeHandle.
ToMethodTable
()->IsByRefLike;
536
return typeHandle.
ToMethodTable
()->IsDynamicType;
542
IntPtr result = RuntimeImports.RhResolveStaticDispatchOnType(instanceType.
ToMethodTable
(), interfaceType.
ToMethodTable
(), checked((ushort)slot), &genericContextPtr);
552
return RuntimeImports.RhResolveDispatchOnType(instanceType.
ToMethodTable
(), interfaceType.
ToMethodTable
(), checked((ushort)slot));
557
return typeHandle.
ToMethodTable
()->IsPointer;
562
return typeHandle.
ToMethodTable
()->IsFunctionPointer;
567
return new RuntimeTypeHandle(typeHandle.
ToMethodTable
()->FunctionPointerReturnType);
572
return (int)typeHandle.
ToMethodTable
()->NumFunctionPointerParameters;
578
return new RuntimeTypeHandle(typeHandle.
ToMethodTable
()->FunctionPointerParameters[argumentIndex]);
588
MethodTableList parameters = typeHandle.
ToMethodTable
()->FunctionPointerParameters;
599
return typeHandle.
ToMethodTable
()->IsUnmanagedFunctionPointer;
604
return typeHandle.
ToMethodTable
()->IsByRef;
609
return typeHandle.
ToMethodTable
()->IsGenericTypeDefinition;
614
return InvokeUtils.CheckArgument(srcObject, dstType.
ToMethodTable
(), InvokeUtils.CheckArgumentSemantics.DynamicInvoke, binderBundle);
621
return InvokeUtils.CheckArgument(srcObject, dstType.
ToMethodTable
(), InvokeUtils.CheckArgumentSemantics.SetFieldDirect, binderBundle: null);
627
return RuntimeImports.AreTypesAssignable(srcEEType, dstType.
ToMethodTable
());
635
return declaringTypeHandle.
ToMethodTable
()->IsNullable;
640
MethodTable* theT = nullableType.
ToMethodTable
()->NullableType;
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
614
if (!RuntimeImports.AreTypesAssignable(pMarshallerType.
ToMethodTable
(), MethodTable.Of<ICustomMarshaler>()))
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (1)
55
MethodTable* structureMT = structureTypeHandle.
ToMethodTable
();
Internal\Runtime\CompilerHelpers\SharedCodeHelpers.cs (1)
33
return th.
ToMethodTable
();
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (4)
40
_declaringType = declaringTypeOfSlot.
ToMethodTable
();
51
_declaringType = declaringTypeOfSlot.
ToMethodTable
();
64
_declaringType = declaringType.
ToMethodTable
();
177
return RuntimeImports.RhResolveDispatchOnType(thisType.
ToMethodTable
(), resolver->_declaringType, (ushort)resolver->_methodHandleOrSlotOrCodePointer);
System\Array.NativeAot.cs (3)
84
return NewMultiDimArray(arrayType.TypeHandle.
ToMethodTable
(), pImmutableLengths, rank);
124
MethodTable* eeType = arrayType.TypeHandle.
ToMethodTable
();
252
return RuntimeImports.RhNewArray(elementType.MakeArrayType().TypeHandle.
ToMethodTable
(), pDimensions[0]);
System\Delegate.cs (1)
389
MethodTable* delegateEEType = typeHandle.
ToMethodTable
();
System\Enum.NativeAot.cs (2)
30
return enumType.TypeHandle.
ToMethodTable
()->ElementType switch
71
return new EETypePtr(rt.TypeHandle.
ToMethodTable
()).CorElementType;
System\InvokeUtils.cs (2)
385
if (dstEEType == typeof(void*).TypeHandle.
ToMethodTable
() || RuntimeImports.AreTypesAssignable(pSourceType: srcPointer.GetPointerType().TypeHandle.
ToMethodTable
(), pTargetType: dstEEType))
System\Reflection\DynamicInvokeInfo.cs (2)
86
MethodTable* eeArgumentType = argumentType.TypeHandle.
ToMethodTable
();
132
MethodTable* eeReturnType = returnType.TypeHandle.
ToMethodTable
();
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (3)
321
MethodTable* mt = type.TypeHandle.
ToMethodTable
();
374
MethodTable* mt = type.
ToMethodTable
();
406
MethodTable* mt = type.
ToMethodTable
();
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (1)
24
MethodTable* implType = handle.
ToMethodTable
();
System\Runtime\InteropServices\Marshal.NativeAot.cs (5)
47
if (t.TypeHandle.
ToMethodTable
()->IsGenericTypeDefinition)
97
if (structureTypeHandle.
ToMethodTable
()->IsGeneric)
100
if (structureTypeHandle.
ToMethodTable
()->IsEnum ||
101
structureTypeHandle.
ToMethodTable
()->IsInterface ||
102
RuntimeImports.AreTypesAssignable(MethodTable.Of<Delegate>(), structureTypeHandle.
ToMethodTable
()))
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
234
if (delegateType.
ToMethodTable
()->BaseType != MethodTable.Of<MulticastDelegate>())
System\RuntimeType.NativeAot.cs (1)
174
if (!(underlyingType.TypeHandle.
ToMethodTable
() == value.GetMethodTable()))
System\RuntimeTypeHandle.cs (1)
41
return (int)this.
ToMethodTable
()->HashCode;
System\Type.NativeAot.cs (1)
23
public static unsafe Type? GetTypeFromHandle(RuntimeTypeHandle handle) => handle.IsNull ? null : GetTypeFromMethodTable(handle.
ToMethodTable
());
System\TypedReference.cs (1)
53
MethodTable* mt = handle.
ToMethodTable
();