Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PropertyInfo.cs
Go to the documentation of this file.
4
5namespace System.Reflection;
6
7public abstract class PropertyInfo : MemberInfo
8{
9 public override MemberTypes MemberType => MemberTypes.Property;
10
11 public abstract Type PropertyType { get; }
12
13 public abstract PropertyAttributes Attributes { get; }
14
15 public bool IsSpecialName => (Attributes & PropertyAttributes.SpecialName) != 0;
16
17 public abstract bool CanRead { get; }
18
19 public abstract bool CanWrite { get; }
20
21 public virtual MethodInfo? GetMethod => GetGetMethod(nonPublic: true);
22
23 public virtual MethodInfo? SetMethod => GetSetMethod(nonPublic: true);
24
25 public abstract ParameterInfo[] GetIndexParameters();
26
28 {
29 return GetAccessors(nonPublic: false);
30 }
31
32 public abstract MethodInfo[] GetAccessors(bool nonPublic);
33
35 {
36 return GetGetMethod(nonPublic: false);
37 }
38
39 public abstract MethodInfo? GetGetMethod(bool nonPublic);
40
42 {
43 return GetSetMethod(nonPublic: false);
44 }
45
46 public abstract MethodInfo? GetSetMethod(bool nonPublic);
47
49 {
50 return Type.EmptyTypes;
51 }
52
54 {
55 return Type.EmptyTypes;
56 }
57
58 [DebuggerHidden]
59 [DebuggerStepThrough]
60 public object? GetValue(object? obj)
61 {
62 return GetValue(obj, null);
63 }
64
65 [DebuggerHidden]
66 [DebuggerStepThrough]
67 public virtual object? GetValue(object? obj, object?[]? index)
68 {
69 return GetValue(obj, BindingFlags.Default, null, index, null);
70 }
71
72 public abstract object? GetValue(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture);
73
74 public virtual object? GetConstantValue()
75 {
77 }
78
79 public virtual object? GetRawConstantValue()
80 {
82 }
83
84 [DebuggerHidden]
85 [DebuggerStepThrough]
86 public void SetValue(object? obj, object? value)
87 {
88 SetValue(obj, value, null);
89 }
90
91 [DebuggerHidden]
92 [DebuggerStepThrough]
93 public virtual void SetValue(object? obj, object? value, object?[]? index)
94 {
95 SetValue(obj, value, BindingFlags.Default, null, index, null);
96 }
97
98 public abstract void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture);
99
100 public override bool Equals(object? obj)
101 {
102 return base.Equals(obj);
103 }
104
105 public override int GetHashCode()
106 {
107 return base.GetHashCode();
108 }
109
110 [MethodImpl(MethodImplOptions.AggressiveInlining)]
111 public static bool operator ==(PropertyInfo? left, PropertyInfo? right)
112 {
113 if ((object)right == null)
114 {
115 if ((object)left != null)
116 {
117 return false;
118 }
119 return true;
120 }
121 if ((object)left == right)
122 {
123 return true;
124 }
125 return left?.Equals(right) ?? false;
126 }
127
128 public static bool operator !=(PropertyInfo? left, PropertyInfo? right)
129 {
130 return !(left == right);
131 }
132}
static Exception ByDesign
virtual void SetValue(object? obj, object? value, object?[]? index)
virtual ? MethodInfo GetMethod
override MemberTypes MemberType
void SetValue(object? obj, object? value)
object? GetValue(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture)
virtual ? object GetConstantValue()
static bool operator==(PropertyInfo? left, PropertyInfo? right)
virtual ? MethodInfo SetMethod
override bool Equals(object? obj)
virtual ? object GetRawConstantValue()
MethodInfo? GetSetMethod(bool nonPublic)
void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture)
MethodInfo? GetGetMethod(bool nonPublic)
PropertyAttributes Attributes
object? GetValue(object? obj)
MethodInfo[] GetAccessors(bool nonPublic)
virtual ? object GetValue(object? obj, object?[]? index)
static bool operator!=(PropertyInfo? left, PropertyInfo? right)
virtual Type[] GetRequiredCustomModifiers()
virtual Type[] GetOptionalCustomModifiers()
ParameterInfo[] GetIndexParameters()
static readonly Type[] EmptyTypes
Definition Type.cs:19