Mon Jul 1 18:01:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection / MonoField.cs
index 20dddd1e1e54f2acb48bc27747d7de0b3930e125..1c427e141646d66539a84685f59c0466137e0edc 100755 (executable)
@@ -22,7 +22,7 @@ namespace System.Reflection {
                public String name;
                public FieldAttributes attrs;
                
-               [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
                internal static extern void get_field_info (MonoField field, out MonoFieldInfo info);
        }
 
@@ -71,20 +71,29 @@ namespace System.Reflection {
                        }
                }
 
-               public override bool IsDefined (Type attribute_type, bool inherit) {
-                       return false;
+               public override bool IsDefined (Type attributeType, bool inherit) {
+                       return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
                }
 
                public override object[] GetCustomAttributes( bool inherit) {
-                       return null;
+                       return MonoCustomAttrs.GetCustomAttributes (this, inherit);
                }
                public override object[] GetCustomAttributes( Type attributeType, bool inherit) {
-                       return null;
+                       return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
                }
 
-               public override object GetValue(object obj) {
-                       throw new NotImplementedException ("Field::GetValue");
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               public extern override object GetValue(object obj);
+
+               public override string ToString () {
+                       MonoFieldInfo info;
+                       MonoFieldInfo.get_field_info (this, out info);
+                       return String.Format ("{0} {1}", info.type, info.name);
                }
 
+               [MonoTODO]
+               public override void SetValue (object obj, object val, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
+               {
+               }
        }
 }