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); }
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); }
protected static float ReadSingle(XmlListReader input) { return(XmlConvert.ToSingle(input.ReadString())); }