You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -44,15 +44,22 @@ namespace System.Reflection
|
||||
[Serializable]
|
||||
[ClassInterfaceAttribute (ClassInterfaceType.None)]
|
||||
#endif
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
class RuntimeParameterInfo : ParameterInfo {
|
||||
internal MarshalAsAttribute marshalAs;
|
||||
|
||||
// Called by the runtime
|
||||
internal RuntimeParameterInfo (string name, Type type, int position, int attrs, object defaultValue, MemberInfo member, MarshalAsAttribute marshalAs) {
|
||||
NameImpl = name;
|
||||
ClassImpl = type;
|
||||
PositionImpl = position;
|
||||
AttrsImpl = (ParameterAttributes)attrs;
|
||||
DefaultValueImpl = defaultValue;
|
||||
MemberImpl = member;
|
||||
this.marshalAs = marshalAs;
|
||||
}
|
||||
|
||||
internal static void FormatParameters (StringBuilder sb, ParameterInfo[] p, CallingConventions callingConvention, bool serialization)
|
||||
{
|
||||
#if NETCORE
|
||||
throw new NotImplementedException ();
|
||||
#else
|
||||
for (int i = 0; i < p.Length; ++i) {
|
||||
if (i > 0)
|
||||
sb.Append (", ");
|
||||
@@ -77,7 +84,6 @@ namespace System.Reflection
|
||||
sb.Append (", ");
|
||||
sb.Append ("...");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MONO_FEATURE_SRE
|
||||
@@ -244,7 +250,7 @@ namespace System.Reflection
|
||||
|
||||
if (marshalAs != null) {
|
||||
#if NETCORE
|
||||
throw new NotImplementedException ();
|
||||
attrs [count ++] = (MarshalAsAttribute)marshalAs.CloneInternal ();
|
||||
#else
|
||||
attrs [count ++] = marshalAs.Copy ();
|
||||
#endif
|
||||
@@ -304,7 +310,7 @@ namespace System.Reflection
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
internal extern Type[] GetTypeModifiers (bool optional);
|
||||
internal static extern Type[] GetTypeModifiers (Type type, MemberInfo member, int position, bool optional);
|
||||
|
||||
internal static ParameterInfo New (ParameterInfo pinfo, Type type, MemberInfo member, int position)
|
||||
{
|
||||
@@ -321,6 +327,6 @@ namespace System.Reflection
|
||||
return new RuntimeParameterInfo (type, member, marshalAs);
|
||||
}
|
||||
|
||||
private Type[] GetCustomModifiers (bool optional) => GetTypeModifiers (optional) ?? Type.EmptyTypes;
|
||||
private Type[] GetCustomModifiers (bool optional) => GetTypeModifiers (ParameterType, Member, Position, optional) ?? Type.EmptyTypes;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user