2 using System.Xml.Serialization;
3 using DirectOutput.General.Generic;
4 using DirectOutput.Cab.Toys.Layer;
6 namespace DirectOutput.Cab.Color
12 public class ColorList : NamedItemList<RGBAColorNamed>, IXmlSerializable
15 #region IXmlSerializable implementation
20 public void WriteXml(XmlWriter writer)
23 XmlSerializerNamespaces Namespaces =
new XmlSerializerNamespaces();
24 Namespaces.Add(
string.Empty,
string.Empty);
27 XmlSerializer serializer =
new XmlSerializer(typeof(
RGBAColorNamed));
28 serializer.Serialize(writer, C, Namespaces);
37 public void ReadXml(XmlReader reader)
39 if (reader.IsEmptyElement)
41 reader.ReadStartElement();
47 while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
52 XmlSerializer serializer =
new XmlSerializer(typeof(
RGBAColorNamed));
54 if (!Contains(C.
Name))
64 reader.ReadEndElement();
72 public System.Xml.Schema.XmlSchema
GetSchema() {
return (null); }