[ComDefaultInterfaceAttribute (typeof (_PropertyInfo))]
[Serializable]
[ClassInterface(ClassInterfaceType.None)]
+#if MOBILE
+ public abstract class PropertyInfo : MemberInfo {
+#else
public abstract class PropertyInfo : MemberInfo, _PropertyInfo {
-
+#endif
public abstract PropertyAttributes Attributes { get; }
public abstract bool CanRead { get; }
public abstract bool CanWrite { get; }
+
+#if NET_4_5
+ public virtual MethodInfo GetMethod {
+ get { return GetGetMethod(true); }
+ }
+
+ public virtual MethodInfo SetMethod {
+ get { return GetSetMethod(true); }
+ }
+#endif
public bool IsSpecialName {
get {return (Attributes & PropertyAttributes.SpecialName) != 0;}
public abstract ParameterInfo[] GetIndexParameters();
-#if ONLY_1_1
- public new Type GetType ()
- {
- return base.GetType ();
- }
-#endif
-
public MethodInfo GetSetMethod()
{
return GetSetMethod (false);
{
return GetValue(obj, BindingFlags.Default, null, index, null);
}
-
+
+#if NET_4_5
+ [DebuggerHidden]
+ [DebuggerStepThrough]
+ public object GetValue (object obj)
+ {
+ return GetValue(obj, BindingFlags.Default, null, null, null);
+ }
+#endif
+
public abstract object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
[DebuggerHidden]
{
SetValue (obj, value, BindingFlags.Default, null, index, null);
}
-
+
+#if NET_4_5
+ [DebuggerHidden]
+ [DebuggerStepThrough]
+ public void SetValue (object obj, object value)
+ {
+ SetValue (obj, value, BindingFlags.Default, null, null, null);
+ }
+#endif
+
public abstract void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
public virtual Type[] GetOptionalCustomModifiers () {
return Type.EmptyTypes;
}
- NotImplementedException CreateNIE () {
+ static NotImplementedException CreateNIE ()
+ {
return new NotImplementedException ();
}
#if NET_4_0
public override bool Equals (object obj)
{
- return obj == this;
+ return obj == (object) this;
}
public override int GetHashCode ()
}
#endif
+#if !MOBILE
void _PropertyInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException ();
}
+ Type _PropertyInfo.GetType ()
+ {
+ // Required or object::GetType becomes virtual final
+ return base.GetType ();
+ }
+
void _PropertyInfo.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException ();
{
throw new NotImplementedException ();
}
+#endif
}
}