當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。