2007-11-16 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 16 Nov 2007 18:59:56 +0000 (18:59 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 16 Nov 2007 18:59:56 +0000 (18:59 -0000)
        * EnumBuilder.cs, TypeBuilder.cs : implemented missing 2.0
          stuff, in harmless manner.

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

mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs

index 53edc5689fe17edd65b387e1e179cb4ce65c7596..202de0424fc7211e18bf3aa93f5b7cd481af04b8 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-16  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * EnumBuilder.cs, TypeBuilder.cs : implemented missing 2.0
+         stuff, in harmless manner.
+
 2007-11-16  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ConstructorBuilder.cs : added CallingConvention.
index ada68401f881acaa32d4812c03a664042ce89fc0..e08b46ee0b47ed1c45dbb2362b38ec3c7b82b1f9 100644 (file)
@@ -184,6 +184,9 @@ namespace System.Reflection.Emit {
                                modifiers);
                }
 
+#if NET_2_0
+               [ComVisible (true)]
+#endif
                public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
                {
                        return _tb.GetConstructors (bindingAttr);
@@ -234,6 +237,9 @@ namespace System.Reflection.Emit {
                        return _tb.GetInterface (name, ignoreCase);
                }
 
+#if NET_2_0
+               [ComVisible (true)]
+#endif
                public override InterfaceMapping GetInterfaceMap (Type interfaceType)
                {
                        return _tb.GetInterfaceMap (interfaceType);
@@ -345,47 +351,44 @@ namespace System.Reflection.Emit {
                        return _tb.IsDefined (attributeType, inherit);
                }
 
-               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-               {
-                       _tb.SetCustomAttribute (customBuilder);
-               }
-
 #if NET_2_0
-               [ComVisible (true)]
-#endif
-               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               [MonoTODO]
+               public override Type MakeArrayType ()
                {
-                       SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
+                       return base.MakeArrayType ();
                }
 
-#if NET_2_0 || BOOTSTRAP_NET_2_0
-               [MonoTODO("Not implemented")]
-               public override Type[] GetGenericArguments ()
+               [MonoTODO]
+               public override Type MakeArrayType (int rank)
                {
-                       throw new NotImplementedException ();
+                       return base.MakeArrayType (rank);
                }
 
-               [MonoTODO("Not implemented")]
-               public override bool ContainsGenericParameters {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+               [MonoTODO]
+               public override Type MakeByRefType ()
+               {
+                       return base.MakeByRefType ();
                }
 
                [MonoTODO]
-               public override bool IsGenericParameter {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+               public override Type MakePointerType ()
+               {
+                       return base.MakePointerType ();
                }
+#endif
 
-               [MonoTODO]
-               public override int GenericParameterPosition {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       _tb.SetCustomAttribute (customBuilder);
                }
+
+#if NET_2_0
+               [ComVisible (true)]
 #endif
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
+               }
 
                private Exception CreateNotSupportedException ()
                {
index bce0db116395c8afdcbbcdcb020674f60409c510..83d7d7c7e564b4577758cf07a7fa0c68175d6502 100644 (file)
@@ -1280,6 +1280,7 @@ namespace System.Reflection.Emit
                        return false;
                }
 
+               // FIXME: I doubt just removing this still works.
                protected override bool IsValueTypeImpl ()
                {
                        return ((type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false) || type_is_subtype_of (this, typeof(System.ValueType), false)) &&
@@ -1287,6 +1288,38 @@ namespace System.Reflection.Emit
                                this != pmodule.assemblyb.corlib_enum_type);
                }
                
+#if NET_2_0
+               [MonoTODO]
+               public override Type MakeArrayType ()
+               {
+                       return base.MakeArrayType ();
+               }
+
+               [MonoTODO]
+               public override Type MakeArrayType (int rank)
+               {
+                       return base.MakeArrayType (rank);
+               }
+
+               [MonoTODO]
+               public override Type MakeByRefType ()
+               {
+                       return base.MakeByRefType ();
+               }
+
+               [MonoTODO]
+               public override Type MakeGenericType (params Type [] typeArguments)
+               {
+                       return base.MakeGenericType (typeArguments);
+               }
+
+               [MonoTODO]
+               public override Type MakePointerType ()
+               {
+                       return base.MakePointerType ();
+               }
+#endif
+               
                public override RuntimeTypeHandle TypeHandle {
                        get {
                                check_created ();