Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RuntimeFieldInfo.cs
Go to the documentation of this file.
2
3namespace System.Reflection;
4
5internal abstract class RuntimeFieldInfo : FieldInfo
6{
8
10
12
14
16
17 public override MemberTypes MemberType => MemberTypes.Field;
18
19 public override Type ReflectedType
20 {
21 get
22 {
23 if (!m_reflectedTypeCache.IsGlobal)
24 {
26 }
27 return null;
28 }
29 }
30
31 public override Type DeclaringType
32 {
33 get
34 {
35 if (!m_reflectedTypeCache.IsGlobal)
36 {
37 return m_declaringType;
38 }
39 return null;
40 }
41 }
42
43 public override Module Module => GetRuntimeModule();
44
46
53
55 {
56 return m_declaringType;
57 }
58
60 {
61 return m_declaringType;
62 }
63
64 internal abstract RuntimeModule GetRuntimeModule();
65
70
71 public override string ToString()
72 {
73 return FieldType.FormatTypeName() + " " + Name;
74 }
75
76 public override object[] GetCustomAttributes(bool inherit)
77 {
79 }
80
81 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
82 {
83 if (attributeType == null)
84 {
85 throw new ArgumentNullException("attributeType");
86 }
87 RuntimeType runtimeType = attributeType.UnderlyingSystemType as RuntimeType;
88 if (runtimeType == null)
89 {
90 throw new ArgumentException(SR.Arg_MustBeType, "attributeType");
91 }
93 }
94
95 public override bool IsDefined(Type attributeType, bool inherit)
96 {
97 if (attributeType == null)
98 {
99 throw new ArgumentNullException("attributeType");
100 }
101 RuntimeType runtimeType = attributeType.UnderlyingSystemType as RuntimeType;
102 if (runtimeType == null)
103 {
104 throw new ArgumentException(SR.Arg_MustBeType, "attributeType");
105 }
107 }
108
113}
static object[] GetCustomAttributes(RuntimeType type, RuntimeType caType, bool inherit)
static bool IsDefined(RuntimeType type, RuntimeType caType, bool inherit)
static IList< CustomAttributeData > GetCustomAttributesInternal(RuntimeType target)
override bool IsDefined(Type attributeType, bool inherit)
override bool HasSameMetadataDefinitionAs(MemberInfo other)
override object[] GetCustomAttributes(bool inherit)
override object[] GetCustomAttributes(Type attributeType, bool inherit)
RuntimeType.RuntimeTypeCache m_reflectedTypeCache
RuntimeFieldInfo(RuntimeType.RuntimeTypeCache reflectedTypeCache, RuntimeType declaringType, BindingFlags bindingFlags)
override IList< CustomAttributeData > GetCustomAttributesData()
override bool IsCollectible
static string Arg_MustBeType
Definition SR.cs:302
Definition SR.cs:7
string FormatTypeName()
Definition Type.cs:1098