public GetCurrentMemberInfo ( ) : |
||
Résultat |
public override object Deserialize(XmlReader reader, SerializationContext state) { var s = XmlReaderHelper.ReadCurrentNodeValue(reader); if (state.GetCurrentMemberInfo().Substitutor != null) { s = state.GetCurrentMemberInfo().Substitutor.Substitute(s); } return Deserialize(s, state); }
public override object Deserialize(XmlReader reader, SerializationContext state) { var s = XmlReaderHelper.ReadCurrentNodeValue(reader); if (state.GetCurrentMemberInfo().Substitutor != null) { s = state.GetCurrentMemberInfo().Substitutor.Substitute(s); } return(Deserialize(s, state)); }
public override string Serialize(object obj, SerializationContext state) { var attribute = (XmlSerializeEnumAsIntAttribute)state.GetCurrentMemberInfo().GetFirstApplicableAttribute(typeof(XmlSerializeEnumAsIntAttribute)); if (attribute != null && attribute.Value) { return Convert.ToInt32(obj).ToString(); } return Enum.Format(supportedType, obj, "G"); }
public override string Serialize(object obj, SerializationContext state) { var attribute = (XmlSerializeEnumAsIntAttribute)state.GetCurrentMemberInfo().GetFirstApplicableAttribute(typeof(XmlSerializeEnumAsIntAttribute)); if (attribute != null && attribute.Value) { return(Convert.ToInt32(obj).ToString()); } return(Enum.Format(supportedType, obj, "G")); }