|
|
@@ -73,7 +73,25 @@ namespace System.Reflection
|
|
|
this.AttrsImpl = ParameterAttributes.Retval;
|
|
|
this.marshalAs = marshalAs;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ public override string ToString() {
|
|
|
+ Type elementType = ClassImpl;
|
|
|
+ while (elementType.HasElementType) {
|
|
|
+ elementType = elementType.GetElementType();
|
|
|
+ }
|
|
|
+ bool useShort = elementType.IsPrimitive || ClassImpl == typeof(void)
|
|
|
+ || ClassImpl.Namespace == MemberImpl.DeclaringType.Namespace;
|
|
|
+ string result = useShort
|
|
|
+ ? ClassImpl.Name
|
|
|
+ : ClassImpl.FullName;
|
|
|
+ // MS.NET seems to skip this check and produce an extra space for return types
|
|
|
+ if (!IsRetval) {
|
|
|
+ result += ' ';
|
|
|
+ result += NameImpl;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
public virtual Type ParameterType {
|
|
|
get {return ClassImpl;}
|
|
|
}
|