Просмотр исходного кода

2005-10-26 Atsushi Enomoto <[email protected]>

	* MonoMethod.cs : (ToString) add suffix " ByRef" for byref parameters.
	  Fixed bug #76541.

	* MethodInfoTest.cs : added test for bug #76541.


svn path=/trunk/mcs/; revision=52253
Atsushi Eno 20 лет назад
Родитель
Сommit
53c071946f

+ 5 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,3 +1,8 @@
+2005-10-26  Atsushi Enomoto  <[email protected]>
+
+	* MonoMethod.cs : (ToString) add suffix " ByRef" for byref parameters.
+	  Fixed bug #76541.
+
 2005-10-04  Martin Baulig  <[email protected]>
 
 	* MonoGenericClass.cs (MonoGenericClass.GetParentType): Changed

+ 2 - 0
mcs/class/corlib/System.Reflection/MonoMethod.cs

@@ -225,6 +225,8 @@ namespace System.Reflection {
 					parms = parms + pt.Namespace + "." + pt.Name;
 				else
 					parms = parms + pt.Name;
+				if (pt.IsByRef)
+					parms += " ByRef";
 			}
 			if (ReturnType.IsClass && ReturnType.Namespace != "")
 				return ReturnType.Namespace + "." + ReturnType.Name + " " + Name + "(" + parms + ")";

+ 4 - 0
mcs/class/corlib/Test/System.Reflection/ChangeLog

@@ -1,3 +1,7 @@
+2005-10-26  Atsushi Enomoto  <[email protected]>
+
+	* MethodInfoTest.cs : added test for bug #76541.
+
 2005-09-26  Carlos Alberto Cortez <[email protected]>
 
 	* AssemblyNameTest.cs: Added some tests for the 2.0 new

+ 12 - 0
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs

@@ -109,6 +109,18 @@ namespace MonoTests.System.Reflection
 				a1 = 2;
 		}
 
+		public void HeyHey (out string out1, ref string ref1)
+		{
+			out1 = null;
+		}
+
+		[Test] // bug #76541
+		public void ToStringByRef ()
+		{
+			AssertEquals ("Void HeyHey(System.String ByRef, System.String ByRef)",
+				this.GetType ().GetMethod ("HeyHey").ToString ());
+		}
+
 #if NET_2_0
 		[Test]
 		[ExpectedException (typeof (ArgumentException))]