blob: 16dfd9c394187be05731128d8c7bf60d2fba379e (
plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
//
// System.Reflection.FieldInfo.cs
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
// TODO: Mucho left to implement.
//
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Globalization;
using System.Runtime.CompilerServices;
namespace System.Reflection {
[Serializable]
public abstract class FieldInfo : MemberInfo {
public abstract FieldAttributes Attributes {get;}
public abstract RuntimeFieldHandle FieldHandle {get;}
public abstract Type FieldType { get; }
public abstract object GetValue(object obj);
public override MemberTypes MemberType {
get { return MemberTypes.Field;}
}
public bool IsLiteral
{
get {return (Attributes & FieldAttributes.Literal) != 0;}
}
public bool IsStatic
{
get {return (Attributes & FieldAttributes.Static) != 0;}
}
public bool IsInitOnly
{
get {return (Attributes & FieldAttributes.InitOnly) != 0;}
}
public Boolean IsPublic
{
get
{
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.Public;
}
}
public Boolean IsPrivate
{
get
{
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.Private;
}
}
public Boolean IsFamily
{
get
{
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.Family;
}
}
public Boolean IsAssembly
{
get
{
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.Assembly;
}
}
public Boolean IsFamilyAndAssembly
{
get {
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.FamANDAssem;
}
}
public Boolean IsFamilyOrAssembly
{
get
{
return (Attributes & FieldAttributes.FieldAccessMask) == FieldAttributes.FamORAssem;
}
}
public Boolean IsPinvokeImpl
{
get
{
return (Attributes & FieldAttributes.PinvokeImpl) == FieldAttributes.PinvokeImpl;
}
}
public Boolean IsSpecialName
{
get
{
return (Attributes & FieldAttributes.SpecialName) == FieldAttributes.SpecialName;
}
}
public Boolean IsNotSerialized
{
get
{
return (Attributes & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
}
}
public abstract void SetValue (object obj, object val, BindingFlags invokeAttr, Binder binder, CultureInfo culture);
[MonoTODO]
public void SetValue( object obj, object value) {
}
}
}
|