internal void InternalSetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, bool requiresAccessCheck, bool isBinderDefault)
        {
            RtFieldInfo field = this.m_field as RtFieldInfo;

            if (field != null)
            {
                field.InternalSetValue(obj, value, invokeAttr, binder, culture, false);
            }
            else
            {
                this.m_field.SetValue(obj, value, invokeAttr, binder, culture);
            }
        }
Esempio n. 2
0
        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)fi).InternalSetValue(target, value, BindingFlags.Default, s_binder, null, false, true);
            }
        }
Esempio n. 3
0
        internal static void SerializationSetValue(MemberInfo fi, Object target, Object value)
        {
            BCLDebug.Assert(fi is RuntimeFieldInfo || fi is SerializationFieldInfo,
                            "[SerializationSetValue]fi is RuntimeFieldInfo || fi is SerializationFieldInfo.");

            RtFieldInfo rfi = fi as RtFieldInfo;

            if (rfi != null)
            {
                rfi.InternalSetValue(target, value, (BindingFlags)0, s_binder, null, false);
            }
            else
            {
                ((SerializationFieldInfo)fi).InternalSetValue(target, value, (BindingFlags)0, s_binder, null, false, true);
            }
        }
        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);
            }
        }