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

◆ SetValue() [1/3]

override void System.Reflection.RtFieldInfo.SetValue ( object obj,
object value,
BindingFlags invokeAttr,
Binder binder,
CultureInfo culture )
inline

Definition at line 158 of file RtFieldInfo.cs.

159 {
160 INVOCATION_FLAGS invocationFlags = InvocationFlags;
161 RuntimeType runtimeType = DeclaringType as RuntimeType;
162 if ((invocationFlags & INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE) != 0)
163 {
164 if (runtimeType != null && runtimeType.ContainsGenericParameters)
165 {
166 throw new InvalidOperationException(SR.Arg_UnboundGenField);
167 }
168 throw new FieldAccessException();
169 }
171 RuntimeType runtimeType2 = (RuntimeType)FieldType;
172 value = runtimeType2.CheckValue(value, binder, culture, invokeAttr);
173 bool domainInitialized = false;
174 if (runtimeType == null)
175 {
176 RuntimeFieldHandle.SetValue(this, obj, value, runtimeType2, m_fieldAttributes, null, ref domainInitialized);
177 return;
178 }
179 domainInitialized = runtimeType.DomainInitialized;
180 RuntimeFieldHandle.SetValue(this, obj, value, runtimeType2, m_fieldAttributes, runtimeType, ref domainInitialized);
181 runtimeType.DomainInitialized = domainInitialized;
182 }
void CheckConsistency(object target)
INVOCATION_FLAGS InvocationFlags
FieldAttributes m_fieldAttributes

References System.SR.Arg_UnboundGenField, System.Reflection.RtFieldInfo.CheckConsistency(), System.RuntimeType.CheckValue(), System.RuntimeType.ContainsGenericParameters, System.culture, System.Reflection.RuntimeFieldInfo.DeclaringType, System.RuntimeType.DomainInitialized, System.Reflection.RtFieldInfo.FieldType, System.Reflection.RtFieldInfo.InvocationFlags, System.Reflection.RtFieldInfo.m_fieldAttributes, System.obj, System.RuntimeFieldHandle.SetValue(), and System.value.