Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetValue() [1/2]

override object System.Reflection.RtFieldInfo.GetValue ( object obj)
inline

Definition at line 115 of file RtFieldInfo.cs.

116 {
117 INVOCATION_FLAGS invocationFlags = InvocationFlags;
118 RuntimeType runtimeType = DeclaringType as RuntimeType;
119 if ((invocationFlags & INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE) != 0)
120 {
121 if (runtimeType != null && DeclaringType.ContainsGenericParameters)
122 {
123 throw new InvalidOperationException(SR.Arg_UnboundGenField);
124 }
125 throw new FieldAccessException();
126 }
128 RuntimeType fieldType = (RuntimeType)FieldType;
129 bool domainInitialized = false;
130 if (runtimeType == null)
131 {
132 return RuntimeFieldHandle.GetValue(this, obj, fieldType, null, ref domainInitialized);
133 }
134 domainInitialized = runtimeType.DomainInitialized;
135 object value = RuntimeFieldHandle.GetValue(this, obj, fieldType, runtimeType, ref domainInitialized);
136 runtimeType.DomainInitialized = domainInitialized;
137 return value;
138 }
void CheckConsistency(object target)
INVOCATION_FLAGS InvocationFlags
virtual bool ContainsGenericParameters
Definition Type.cs:336

References System.SR.Arg_UnboundGenField, System.Reflection.RtFieldInfo.CheckConsistency(), System.Type.ContainsGenericParameters, System.Reflection.RuntimeFieldInfo.DeclaringType, System.RuntimeType.DomainInitialized, System.Reflection.RtFieldInfo.FieldType, System.RuntimeFieldHandle.GetValue(), System.Reflection.RtFieldInfo.InvocationFlags, System.obj, and System.value.