Преглед на файлове

2005-06-13 Michal Moskal <[email protected]>

* MonoGenericClass.cs: Don't use MethodHandle in GetMethod/GetConstructor,
since it now throws on MethodBuilders. Don't use FieldHandle in
GetField (throws on FieldBuilder) - just use the name.


svn path=/trunk/mcs/; revision=46052

Martin Baulig преди 20 години
родител
ревизия
7fcfea7366
променени са 2 файла, в които са добавени 12 реда и са изтрити 6 реда
  1. 6 0
      mcs/class/corlib/System.Reflection/ChangeLog
  2. 6 6
      mcs/class/corlib/System.Reflection/MonoGenericClass.cs

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

@@ -1,3 +1,9 @@
+2005-06-13  Michal Moskal <[email protected]>
+	
+	* MonoGenericClass.cs: Don't use MethodHandle in GetMethod/GetConstructor,
+	since it now throws on MethodBuilders. Don't use FieldHandle in
+	GetField (throws on FieldBuilder) - just use the name.
+
 2005-06-15  Sebastien Pouliot  <[email protected]>
 
 	* Assembly.cs, AssemblyName.cs, ConstructorInfo.cs, EventInfo.cs,

+ 6 - 6
mcs/class/corlib/System.Reflection/MonoGenericClass.cs

@@ -57,13 +57,13 @@ namespace System.Reflection
 		protected extern void initialize (MethodInfo[] methods, ConstructorInfo[] ctors, FieldInfo[] fields, PropertyInfo[] properties, EventInfo[] events);
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
-		extern MethodInfo GetCorrespondingInflatedMethod (IntPtr generic);
+		extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
-		extern ConstructorInfo GetCorrespondingInflatedConstructor (IntPtr generic);
+		extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
-		extern FieldInfo GetCorrespondingInflatedField (IntPtr generic);
+		extern FieldInfo GetCorrespondingInflatedField (string generic);
 
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
 		protected extern MethodInfo[] GetMethods_internal (Type reflected_type);
@@ -136,21 +136,21 @@ namespace System.Reflection
 		{
 			initialize ();
 
-			return GetCorrespondingInflatedMethod (fromNoninstanciated.MethodHandle.Value);
+			return GetCorrespondingInflatedMethod (fromNoninstanciated);
 		}
 
 		internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
 		{
 			initialize ();
 
-			return GetCorrespondingInflatedConstructor (fromNoninstanciated.MethodHandle.Value);
+			return GetCorrespondingInflatedConstructor (fromNoninstanciated);
 		}
 
 		internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
 		{
 			initialize ();
 
-			return GetCorrespondingInflatedField (fromNoninstanciated.FieldHandle.Value);
+			return GetCorrespondingInflatedField (fromNoninstanciated.Name);
 		}
 		
 		public override MethodInfo[] GetMethods (BindingFlags bf)