/// <exception cref="System.IO.IOException"/> public virtual double ReadDouble(string tag) { XmlRecordInput.Value v = Next(); if (!"double".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(double.ParseDouble(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual Buffer ReadBuffer(string tag) { XmlRecordInput.Value v = Next(); if (!"string".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(Utils.FromXMLBuffer(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual float ReadFloat(string tag) { XmlRecordInput.Value v = Next(); if (!"ex:float".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(float.ParseFloat(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual long ReadLong(string tag) { XmlRecordInput.Value v = Next(); if (!"ex:i8".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(long.Parse(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual int ReadInt(string tag) { XmlRecordInput.Value v = Next(); if (!"i4".Equals(v.GetType()) && !"int".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(System.Convert.ToInt32(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual bool ReadBool(string tag) { XmlRecordInput.Value v = Next(); if (!"boolean".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return("1".Equals(v.GetValue())); }
/// <exception cref="System.IO.IOException"/> public virtual byte ReadByte(string tag) { XmlRecordInput.Value v = Next(); if (!"ex:i1".Equals(v.GetType())) { throw new IOException("Error deserializing " + tag + "."); } return(byte.ParseByte(v.GetValue())); }