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

2004-04-07 Martin Baulig <[email protected]>

	* Type.cs (Type.GetGenericArguments): Make this abstract.

svn path=/trunk/mcs/; revision=25180
Martin Baulig 22 лет назад
Родитель
Сommit
55a2a2f6fc

+ 5 - 0
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs

@@ -266,6 +266,11 @@ namespace System.Reflection.Emit {
 		}
 
 #if NET_1_2
+		public override Type[] GetGenericArguments ()
+		{
+			throw new NotImplementedException ();
+		}
+
 		public override bool HasGenericArguments {
 			get {
 				throw new NotImplementedException ();

+ 5 - 0
mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs

@@ -294,6 +294,11 @@ namespace System.Reflection.Emit
 			throw not_supported ();
 		}
 
+		public override Type[] GetGenericArguments ()
+		{
+			throw not_supported ();
+		}
+
 		public override Type GetGenericTypeDefinition ()
 		{
 			throw not_supported ();

+ 8 - 0
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs

@@ -1263,6 +1263,14 @@ namespace System.Reflection.Emit {
 		}
 
 #if NET_1_2
+		public override Type[] GetGenericArguments ()
+		{
+			if (generic_params != null)
+				return generic_params;
+
+			throw new InvalidOperationException ();
+		}
+
 		public override Type GetGenericTypeDefinition ()
 		{
 			setup_generic_class (this);

+ 5 - 0
mcs/class/corlib/System.Reflection/TypeDelegator.cs

@@ -230,6 +230,11 @@ namespace System.Reflection {
 			//return typeImpl.IsValueTypeImpl ();
 		}
 #if NET_1_2
+		public override Type[] GetGenericArguments ()
+		{
+			throw new NotImplementedException ();
+		}
+
 		public override bool HasGenericArguments {
 			get {
 				throw new NotImplementedException ();

+ 4 - 0
mcs/class/corlib/System/ChangeLog

@@ -1,3 +1,7 @@
+2004-04-07  Martin Baulig  <[email protected]>
+
+	* Type.cs (Type.GetGenericArguments): Make this abstract.
+
 2004-04-07  Jackson Harper  <[email protected]>
 
 	* Environment.cs: Increase corlib version number.

+ 3 - 0
mcs/class/corlib/System/MonoType.cs

@@ -495,6 +495,9 @@ namespace System
 		}
 
 #if NET_1_2
+		[MethodImplAttribute(MethodImplOptions.InternalCall)]
+		public extern override Type [] GetGenericArguments ();
+
 		public extern override bool HasGenericArguments {
 			[MethodImplAttribute(MethodImplOptions.InternalCall)]
 			get;

+ 1 - 2
mcs/class/corlib/System/Type.cs

@@ -927,8 +927,7 @@ namespace System {
 		}
 
 #if NET_1_2
-		[MethodImplAttribute(MethodImplOptions.InternalCall)]
-		public extern Type [] GetGenericArguments ();
+		public abstract Type[] GetGenericArguments ();
 
 		public abstract bool HasGenericArguments {
 			get;