public object Deserialize(IDeserializerContext context) { var s = context.ReadElementAsString(); if (string.IsNullOrEmpty(s)) { return(default(char)); } return(XmlConvert.ToChar(s)); }
public object Deserialize(IDeserializerContext context) { string uriString = context.ReadElementAsString(); if (uriString == null) { return(null); } try { Uri uri = new Uri(uriString); return(uri); } catch (UriFormatException ex) { throw new SerializationException("The Uri is in an invalid format: " + uriString, ex); } }
public object Deserialize(IDeserializerContext context) { return(Enum.Parse(typeof(T), context.ReadElementAsString())); }
public object Deserialize(IDeserializerContext context) { return(XmlConvert.ToDouble(context.ReadElementAsString())); }
public object Deserialize(IDeserializerContext context) { return(XmlConvert.ToDateTime(context.ReadElementAsString(), XmlDateTimeSerializationMode.Utc)); }
public object Deserialize(IDeserializerContext context) { return(context.ReadElementAsString()); }