Exemple #1
0
        internal static DesktopMethod Create(DesktopRuntimeBase runtime, ICorDebug.IMetadataImport metadata, IMethodDescData mdData)
        {
            if (mdData == null)
            {
                return(null);
            }

            MethodAttributes attrs = 0;

            if (metadata?.GetMethodProps(mdData.MDToken, out int pClass, null, 0, out int methodLength, out attrs, out IntPtr blob, out uint blobLen, out uint codeRva, out uint implFlags) < 0)
            {
                attrs = 0;
            }

            return(new DesktopMethod(runtime, mdData.MethodDesc, mdData, attrs));
        }
Exemple #2
0
        internal static DesktopMethod Create(DesktopRuntimeBase runtime, ICorDebug.IMetadataImport metadata, IMethodDescData mdData)
        {
            if (mdData == null)
                return null;

            MethodAttributes attrs = (MethodAttributes)0;
            if (metadata != null)
            {
                int pClass, methodLength;
                uint blobLen, codeRva, implFlags;
                IntPtr blob;
                if (metadata.GetMethodProps(mdData.MDToken, out pClass, null, 0, out methodLength, out attrs, out blob, out blobLen, out codeRva, out implFlags) < 0)
                    attrs = (MethodAttributes)0;
            }

            return new DesktopMethod(runtime, mdData.MethodDesc, mdData, attrs);
        }