void SetMemberValue(XmlTypeMapMember member, object ob, object value, bool isValueList) { if (isValueList) { ((object[])ob)[member.GlobalIndex] = value; } else { member.SetValue(ob, value); } if (member.IsOptionalValueType) { member.SetValueSpecified(ob, true); } }
void SetMemberValue(XmlTypeMapMember member, object ob, object value, bool isValueList) { var memberType = member.TypeData.Type; if (value != null && !value.GetType().IsAssignableFrom(memberType)) { value = XmlSerializationWriterInterpreter.ImplicitConvert(value, memberType); } if (isValueList) { ((object[])ob)[member.GlobalIndex] = value; } else { member.SetValue(ob, value); } if (member.IsOptionalValueType) { member.SetValueSpecified(ob, true); } }
void SetMemberValue (XmlTypeMapMember member, object ob, object value, bool isValueList) { if (isValueList) ((object[])ob)[member.GlobalIndex] = value; else { member.SetValue (ob, value); if (member.IsOptionalValueType) member.SetValueSpecified (ob, true); } }
void SetMemberValue (XmlTypeMapMember member, object ob, object value, bool isValueList) { var memberType = member.TypeData.Type; if (value != null && !value.GetType().IsAssignableFrom (memberType)) value = XmlSerializationWriterInterpreter.ImplicitConvert (value, memberType); if (isValueList) ((object[])ob)[member.GlobalIndex] = value; else member.SetValue (ob, value); if (member.IsOptionalValueType) member.SetValueSpecified (ob, true); }