You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
@ -427,6 +427,37 @@ namespace System.Reflection {
|
||||
return attrs;
|
||||
}
|
||||
|
||||
internal CustomAttributeData[] GetPseudoCustomAttributesData ()
|
||||
{
|
||||
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;
|
||||
CustomAttributeData[] attrsData = new CustomAttributeData [count];
|
||||
count = 0;
|
||||
|
||||
if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0)
|
||||
attrsData [count++] = new CustomAttributeData ((typeof (PreserveSigAttribute)).GetConstructor (Type.EmptyTypes));
|
||||
if ((info.attrs & MethodAttributes.PinvokeImpl) != 0) {
|
||||
this.GetPInvoke (out PInvokeAttributes flags, out string entryPoint, out string dllName);
|
||||
var ctorArgs = new CustomAttributeTypedArgument[] { new CustomAttributeTypedArgument(typeof(string), dllName) };
|
||||
attrsData [count++] = new CustomAttributeData (
|
||||
(typeof (FieldOffsetAttribute)).GetConstructor (new[] { typeof (string) }),
|
||||
ctorArgs,
|
||||
EmptyArray<CustomAttributeNamedArgument>.Value); //FIXME Get named params
|
||||
}
|
||||
|
||||
return attrsData;
|
||||
}
|
||||
|
||||
public override MethodInfo MakeGenericMethod (Type [] methodInstantiation)
|
||||
{
|
||||
if (methodInstantiation == null)
|
||||
|
Reference in New Issue
Block a user