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
@ -1,4 +1,4 @@
|
||||
// System.Reflection.ParameterInfo
|
||||
// System.Reflection.ParameterInfo
|
||||
//
|
||||
// Authors:
|
||||
// Sean MacIsaac (macisaac@ximian.com)
|
||||
@ -175,6 +175,41 @@ namespace System.Reflection
|
||||
return attrs;
|
||||
}
|
||||
|
||||
internal CustomAttributeData[] GetPseudoCustomAttributesData ()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (IsIn)
|
||||
count++;
|
||||
if (IsOut)
|
||||
count++;
|
||||
if (IsOptional)
|
||||
count++;
|
||||
if (marshalAs != null)
|
||||
count++;
|
||||
|
||||
if (count == 0)
|
||||
return null;
|
||||
CustomAttributeData[] attrsData = new CustomAttributeData [count];
|
||||
count = 0;
|
||||
|
||||
if (IsIn)
|
||||
attrsData [count++] = new CustomAttributeData ((typeof (InAttribute)).GetConstructor (Type.EmptyTypes));
|
||||
if (IsOptional)
|
||||
attrsData [count++] = new CustomAttributeData ((typeof (OptionalAttribute)).GetConstructor (Type.EmptyTypes));
|
||||
if (IsOut)
|
||||
attrsData [count++] = new CustomAttributeData ((typeof (OutAttribute)).GetConstructor (Type.EmptyTypes));
|
||||
if (marshalAs != null) {
|
||||
var ctorArgs = new CustomAttributeTypedArgument[] { new CustomAttributeTypedArgument (typeof (UnmanagedType), marshalAs.Value) };
|
||||
attrsData [count++] = new CustomAttributeData (
|
||||
(typeof (MarshalAsAttribute)).GetConstructor (new[] { typeof( UnmanagedType) }),
|
||||
ctorArgs,
|
||||
EmptyArray<CustomAttributeNamedArgument>.Value);//FIXME Get named params
|
||||
}
|
||||
|
||||
return attrsData;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
internal extern Type[] GetTypeModifiers (bool optional);
|
||||
|
||||
|
Reference in New Issue
Block a user