示例#1
0
        protected FloatColour Deserialize(XmlListReader input)
        {
            FloatColour colour;

            if (input == null)
            {
                throw new ArgumentNullException("input");
            }
            colour.R = ReadSingle(input);
            colour.G = ReadSingle(input);
            colour.B = ReadSingle(input);
            return(colour);
        }
示例#2
0
        protected override FloatColour Deserialize(IntermediateReader input, ContentSerializerAttribute format, FloatColour existingInstance)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }
            XmlListReader reader = new XmlListReader(input);
            FloatColour   local  = this.Deserialize(reader);

            if (!reader.AtEnd)
            {
                throw input.CreateInvalidContentException("XML has too many entries in the space-separated list.", new object[0]);
            }
            return(local);
        }
示例#3
0
 protected static float ReadSingle(XmlListReader input)
 {
     return(XmlConvert.ToSingle(input.ReadString()));
 }