当前位置: 首页>>代码示例>>C#>>正文


C# System.EETypePtr类代码示例

本文整理汇总了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;
 }
开发者ID:nguerrera,项目名称:corert,代码行数:7,代码来源:OpenMethodResolver.cs

示例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);
        }
开发者ID:krytarowski,项目名称:corert,代码行数:9,代码来源:CachedInterfaceDispatch.cs

示例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;
 }
开发者ID:tijoytom,项目名称:corert,代码行数:11,代码来源:Helpers.cs

示例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);
        }
开发者ID:shahid-pk,项目名称:corert,代码行数:12,代码来源:CachedInterfaceDispatch.cs

示例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);
            }
        }
开发者ID:tijoytom,项目名称:corert,代码行数:47,代码来源:ArrayHelpers.cs

示例6: RhUnregisterRefCountedHandleCallback

 internal static extern void RhUnregisterRefCountedHandleCallback(IntPtr pCalloutMethod, EETypePtr pTypeFilter);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例7: RhGetRuntimeHelperForType

 internal static unsafe extern IntPtr RhGetRuntimeHelperForType(EETypePtr pEEType, RuntimeHelperKind kind);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例8: RhHasCctor

 internal static unsafe extern bool RhHasCctor(EETypePtr pEEType);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例9: RhGetGcStaticFieldData

 internal static unsafe extern IntPtr RhGetGcStaticFieldData(EETypePtr pEEType);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例10: RhNewInterfaceDispatchCell

 internal static unsafe extern IntPtr RhNewInterfaceDispatchCell(EETypePtr pEEType, int slotNumber);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例11: RhSetInterface

 internal static unsafe extern void RhSetInterface(EETypePtr pEEType, int index, EETypePtr pEETypeInterface);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例12: RhGetValueTypeSize

 internal static extern uint RhGetValueTypeSize(EETypePtr pEEType);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例13: RhGetCorElementType

 internal static extern RhCorElementType RhGetCorElementType(EETypePtr pEEType);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例14: RhGetGCDescSize

 internal static extern int RhGetGCDescSize(EETypePtr eeType);
开发者ID:TerabyteX,项目名称:corert,代码行数:1,代码来源:RuntimeImports.cs

示例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);
开发者ID:TerabyteX,项目名称:corert,代码行数:2,代码来源:RuntimeImports.cs


注:本文中的System.EETypePtr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。