Thu Dec 14 12:52:27 CET 2006 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Thu, 14 Dec 2006 11:53:12 +0000 (11:53 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Thu, 14 Dec 2006 11:53:12 +0000 (11:53 -0000)
* MonoProperty.cs, ParameterInfo.cs, PropertyInfo.cs:
GetRequiredCustomModifiers()/GetOptionalCustomModifiers()
implementations.

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

mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/MonoProperty.cs
mcs/class/corlib/System.Reflection/ParameterInfo.cs
mcs/class/corlib/System.Reflection/PropertyInfo.cs

index b4d10184f1b476ca0d226c5cd8a447cef10654a9..227ba2ba37d0d67d223c702e5fd3a9d5e8578fad 100644 (file)
@@ -1,4 +1,10 @@
 
+Thu Dec 14 12:52:27 CET 2006 Paolo Molaro <lupus@ximian.com>
+
+       * MonoProperty.cs, ParameterInfo.cs, PropertyInfo.cs:
+       GetRequiredCustomModifiers()/GetOptionalCustomModifiers()
+       implementations.
+
 Tue Dec 12 20:35:10 CET 2006 Paolo Molaro <lupus@ximian.com>
 
        * MethodBase.cs: added missing ComVisible attr.
index b376b27e066ebd6009f54da9c88f7286badf76d3..3510a1fa891dbf3667791991baaa60e2d53a1b2c 100644 (file)
@@ -46,6 +46,10 @@ namespace System.Reflection {
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                internal static extern void get_property_info (MonoProperty prop, out MonoPropertyInfo info,
                                                               PInfo req_info);
+
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal static extern Type[] GetTypeModifiers (MonoProperty prop, bool optional);
+
        }
 
        [Flags]
@@ -233,6 +237,24 @@ namespace System.Reflection {
                public override string ToString () {
                        return PropertyType.ToString () + " " + Name;
                }
+
+#if NET_2_0 || BOOTSTRAP_NET_2_0
+
+               public override Type[] GetOptionalCustomModifiers () {
+                       Type[] types = MonoPropertyInfo.GetTypeModifiers (this, true);
+                       if (types == null)
+                               return Type.EmptyTypes;
+                       return types;
+               }
+
+               public override Type[] GetRequiredCustomModifiers () {
+                       Type[] types = MonoPropertyInfo.GetTypeModifiers (this, false);
+                       if (types == null)
+                               return Type.EmptyTypes;
+                       return types;
+               }
+#endif
+
        }
 }
 
index bace0eadad7e290a06966e9dae8bb030e0446281..646b4792704ce06fe360e5b17beeb8c955125b9a 100644 (file)
@@ -233,14 +233,21 @@ namespace System.Reflection
                        }
                }
 
-               [MonoTODO("Not implemented")]
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               extern Type[] GetTypeModifiers (bool optional);
+
                public virtual Type[] GetOptionalCustomModifiers () {
-                       throw new NotImplementedException ();
+                       Type[] types = GetTypeModifiers (true);
+                       if (types == null)
+                               return Type.EmptyTypes;
+                       return types;
                }
 
-               [MonoTODO("Not implemented")]
                public virtual Type[] GetRequiredCustomModifiers () {
-                       throw new NotImplementedException ();
+                       Type[] types = GetTypeModifiers (false);
+                       if (types == null)
+                               return Type.EmptyTypes;
+                       return types;
                }
 
                [MonoTODO]
index e36cf9cc82d0b8ba562d8dab553f5509cadf5c97..b979cc6850c8850f2150615c9719260908246a35 100644 (file)
@@ -30,6 +30,7 @@
 using System.Diagnostics;
 using System.Globalization;
 using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
 
 namespace System.Reflection {
 
@@ -104,14 +105,13 @@ namespace System.Reflection {
                public abstract void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
 
 #if NET_2_0 || BOOTSTRAP_NET_2_0
-               [MonoTODO("Not implemented")]
+
                public virtual Type[] GetOptionalCustomModifiers () {
-                       throw new NotImplementedException ();
+                       return Type.EmptyTypes;
                }
 
-               [MonoTODO("Not implemented")]
                public virtual Type[] GetRequiredCustomModifiers () {
-                       throw new NotImplementedException ();
+                       return Type.EmptyTypes;
                }
 
                [MonoTODO("Not implemented")]