Example #1
0
        public static Offsets FromString(string offsetsXml, TextFormat textFormat = TextFormat.Text)
        {
            switch (textFormat)
            {
            case TextFormat.Xml:  return(OffsetsXmlSerializer.FromXmlString(offsetsXml));

            case TextFormat.Text: return(OffsetsTextSerializer.FromTextString(offsetsXml));

            default:
                throw (new ArgumentException(textFormat.ToString()));
            }
        }
Example #2
0
        public override string ToString(TextFormat textFormat = TextFormat.Text)
        {
            switch (textFormat)
            {
            case TextFormat.Xml:  return(OffsetsXmlSerializer.ToXmlString(this));

            case TextFormat.Text: return(OffsetsTextSerializer.ToTextString(this));

            default:
                throw (new ArgumentException(textFormat.ToString()));
            }
        }