本文整理汇总了C#中System.EETypePtr类的典型用法代码示例。如果您正苦于以下问题:C# EETypePtr类的具体用法?C# EETypePtr怎么用?C# EETypePtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EETypePtr类属于System命名空间,在下文中一共展示了EETypePtr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenMethodResolver
public OpenMethodResolver(RuntimeTypeHandle declaringType, IntPtr codePointer, int handle)
{
_resolveType = OpenNonVirtualResolve;
_methodHandleOrSlotOrCodePointer = codePointer;
_declaringType = declaringType.ToEETypePtr();
_handle = handle;
}
示例2: RhResolveDispatch
private static IntPtr RhResolveDispatch(object pObject, EETypePtr interfaceType, ushort slot)
{
DispatchCellInfo cellInfo = new DispatchCellInfo();
cellInfo.CellType = DispatchCellType.InterfaceAndSlot;
cellInfo.InterfaceType = interfaceType;
cellInfo.InterfaceSlot = slot;
return RhResolveDispatchWorker(pObject, null, ref cellInfo);
}
示例3: TryGetEEType
public static bool TryGetEEType(this Type type, out EETypePtr eeType)
{
RuntimeTypeHandle typeHandle = RuntimeAugments.Callbacks.GetTypeHandleIfAvailable(type);
if (typeHandle.IsNull)
{
eeType = default(EETypePtr);
return false;
}
eeType = typeHandle.ToEETypePtr();
return true;
}
示例4: RhResolveDispatchOnType
private static IntPtr RhResolveDispatchOnType(EETypePtr instanceType, EETypePtr interfaceType, ushort slot)
{
// Type of object we're dispatching on.
EEType* pInstanceType = instanceType.ToPointer();
// Type of interface
EEType* pInterfaceType = interfaceType.ToPointer();
return DispatchResolve.FindInterfaceMethodImplementationTarget(pInstanceType,
pInterfaceType,
slot);
}
示例5: NewObjArray
/// <summary>
/// Helper for array allocations via `newobj` IL instruction. Dimensions are passed in as block of integers.
/// The content of the dimensions block may be modified by the helper.
/// </summary>
private static unsafe Array NewObjArray(IntPtr pEEType, int nDimensions, int* pDimensions)
{
EETypePtr eeType = new EETypePtr(pEEType);
Debug.Assert(eeType.IsArray);
Debug.Assert(nDimensions > 0);
if (eeType.IsSzArray)
{
Array ret = (Array)RuntimeImports.RhNewArray(eeType, pDimensions[0]);
if (nDimensions > 1)
{
// Jagged arrays have constructor for each possible depth
EETypePtr elementType = eeType.ArrayElementType;
Debug.Assert(elementType.IsSzArray);
Array[] arrayOfArrays = (Array[])ret;
for (int i = 0; i < arrayOfArrays.Length; i++)
arrayOfArrays[i] = NewObjArray(elementType.RawValue, nDimensions - 1, pDimensions + 1);
}
return ret;
}
else
{
// Multidimensional arrays have two ctors, one with and one without lower bounds
int rank = eeType.ArrayRank;
Debug.Assert(rank == nDimensions || 2 * rank == nDimensions);
if (rank < nDimensions)
{
for (int i = 0; i < rank; i++)
{
if (pDimensions[2 * i] != 0)
throw new PlatformNotSupportedException(SR.Arg_NotSupportedNonZeroLowerBound);
pDimensions[i] = pDimensions[2 * i + 1];
}
}
return Array.NewMultiDimArray(eeType, pDimensions, rank);
}
}
示例6: RhUnregisterRefCountedHandleCallback
internal static extern void RhUnregisterRefCountedHandleCallback(IntPtr pCalloutMethod, EETypePtr pTypeFilter);
示例7: RhGetRuntimeHelperForType
internal static unsafe extern IntPtr RhGetRuntimeHelperForType(EETypePtr pEEType, RuntimeHelperKind kind);
示例8: RhHasCctor
internal static unsafe extern bool RhHasCctor(EETypePtr pEEType);
示例9: RhGetGcStaticFieldData
internal static unsafe extern IntPtr RhGetGcStaticFieldData(EETypePtr pEEType);
示例10: RhNewInterfaceDispatchCell
internal static unsafe extern IntPtr RhNewInterfaceDispatchCell(EETypePtr pEEType, int slotNumber);
示例11: RhSetInterface
internal static unsafe extern void RhSetInterface(EETypePtr pEEType, int index, EETypePtr pEETypeInterface);
示例12: RhGetValueTypeSize
internal static extern uint RhGetValueTypeSize(EETypePtr pEEType);
示例13: RhGetCorElementType
internal static extern RhCorElementType RhGetCorElementType(EETypePtr pEEType);
示例14: RhGetGCDescSize
internal static extern int RhGetGCDescSize(EETypePtr eeType);
示例15: RhCreateGenericInstanceDescForType2
internal static unsafe extern bool RhCreateGenericInstanceDescForType2(EETypePtr pEEType, int arity, int nonGcStaticDataSize,
int nonGCStaticDataOffset, int gcStaticDataSize, int threadStaticsOffset, void* pGcStaticsDesc, void* pThreadStaticsDesc, int* pGenericVarianceFlags);