internal object[] GetPseudoCustomAttributes () { int count = 0; /* MS.NET doesn't report MethodImplAttribute */ MonoMethodInfo info = MonoMethodInfo.GetMethodInfo (mhandle); if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0) count ++; if ((info.attrs & MethodAttributes.PinvokeImpl) != 0) count ++; if (count == 0) return null; object[] attrs = new object [count]; count = 0; if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0) attrs [count ++] = new PreserveSigAttribute (); if ((info.attrs & MethodAttributes.PinvokeImpl) != 0) { DllImportAttribute attr = GetDllImportAttribute (mhandle); if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0) attr.PreserveSig = true; attrs [count ++] = attr; } return attrs; }