private InternalSetValue ( Object obj, Object value, BindingFlags invokeAttr, |
||
obj | Object | |
value | Object | |
invokeAttr | BindingFlags | |
binder | ||
culture | ||
requiresAccessCheck | bool | |
isBinderDefault | bool | |
return | void |
internal static void SerializationSetValue(MemberInfo fi, object target, object value) { RtFieldInfo info = fi as RtFieldInfo; if (info != null) { info.InternalSetValue(target, value, BindingFlags.Default, s_binder, null, false); } else { SerializationFieldInfo info2 = fi as SerializationFieldInfo; if (info2 == null) { throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFieldInfo")); } info2.InternalSetValue(target, value, BindingFlags.Default, s_binder, null, false, true); } }
internal static void SerializationSetValue(MemberInfo fi, object target, object value) { RtFieldInfo rtFieldInfo = fi as RtFieldInfo; if (rtFieldInfo != null) { rtFieldInfo.CheckConsistency(target); rtFieldInfo.UnsafeSetValue(target, value, BindingFlags.Default, FormatterServices.s_binder, null); return; } SerializationFieldInfo serializationFieldInfo = fi as SerializationFieldInfo; if (serializationFieldInfo != null) { serializationFieldInfo.InternalSetValue(target, value, BindingFlags.Default, FormatterServices.s_binder, null); return; } throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFieldInfo")); }
internal static void SerializationSetValue(MemberInfo fi, Object target, Object value) { Contract.Requires(fi != null); RtFieldInfo rtField = fi as RtFieldInfo; if (rtField != null) { rtField.CheckConsistency(target); rtField.UnsafeSetValue(target, value, BindingFlags.Default, s_binder, null); return; } SerializationFieldInfo serField = fi as SerializationFieldInfo; if (serField != null) { serField.InternalSetValue(target, value, BindingFlags.Default, s_binder, null); return; } throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFieldInfo")); }