/// <inheritdoc />
        public override void WriteToXml(XmlWriter writer)
        {
            writer.WriteStartElement(TypeIdString);

            writer.WriteElementString(Serialization.Constants.Name, Name);
            if (Filter != null)
            {
                writer.WriteElementString(Serialization.Constants.Filter, Filter);
            }

            if (Prefix != null)
            {
                writer.WriteElementString(Serialization.Constants.Prefix, Prefix);
            }

            writer.WriteElementString(XmlName_RemoveAll, RemoveAllCategories.ToString().ToLowerInvariant());

            writer.WriteStartElement(XmlName_RemoveList);
            foreach (string s in RemoveCategories)
            {
                writer.WriteElementString(XmlName_RemoveItem, s);
            }

            writer.WriteEndElement();

            writer.WriteStartElement(XmlName_AddList);
            foreach (string s in AddCategories)
            {
                writer.WriteElementString(XmlName_AddItem, s);
            }

            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Beispiel #2
0
        public override void WriteToXml(XmlWriter writer)
        {
            writer.WriteStartElement(TypeIdString);

            writer.WriteElementString(XmlNameName, Name);
            if (Filter != null)
            {
                writer.WriteElementString(XmlNameFilter, Filter);
            }
            if (Prefix != null)
            {
                writer.WriteElementString(XmlNamePrefix, Prefix);
            }
            writer.WriteElementString(XmlNameRemoveAll, RemoveAllCategories.ToString());

            writer.WriteStartElement(XmlNameRemoveList);
            foreach (string s in RemoveCategories)
            {
                writer.WriteElementString(XmlNameRemoveItem, s);
            }

            writer.WriteEndElement();

            writer.WriteStartElement(XmlNameAddList);
            foreach (string s in AddCategories)
            {
                writer.WriteElementString(XmlNameAddItem, s);
            }

            writer.WriteEndElement();

            writer.WriteEndElement();
        }