1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
//
// System.Reflection/PropertyInfo.cs
//
// Author:
// Paolo Molaro (lupus@ximian.com)
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
//
using System;
using System.Reflection;
using System.Globalization;
namespace System.Reflection {
[Serializable]
public abstract class PropertyInfo : MemberInfo {
public abstract PropertyAttributes Attributes {get;}
public abstract bool CanRead {get;}
public abstract bool CanWrite {get;}
public bool IsSpecialName {
get {return (Attributes & PropertyAttributes.SpecialName) != 0;}
}
public override MemberTypes MemberType {
get {return MemberTypes.Property;}
}
public abstract Type PropertyType {get;}
protected PropertyInfo() {
}
public MethodInfo[] GetAccessors() {
return GetAccessors (false);
}
public abstract MethodInfo[] GetAccessors( bool nonPublic);
public MethodInfo GetGetMethod() {
return GetGetMethod (false);
}
public abstract MethodInfo GetGetMethod( bool nonPublic);
public abstract ParameterInfo[] GetIndexParameters();
public MethodInfo GetSetMethod() {
return GetSetMethod (false);
}
public abstract MethodInfo GetSetMethod( bool nonPublic);
public virtual object GetValue( object obj, object[] index) {
return GetValue(obj, BindingFlags.Default, null, index, null);
}
public abstract object GetValue( object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
public virtual void SetValue( object obj, object value, object[] index) {
}
public abstract void SetValue( object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
}
}
|