示例#1
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(XmlNameMaxTags, MaxTags.ToString());

            if ((IncludedTags != null) && (IncludedTags.Count > 0))
            {
                writer.WriteStartElement(XmlNameTagList);
                foreach (string s in IncludedTags)
                {
                    writer.WriteElementString(XmlNameTag, s);
                }

                writer.WriteEndElement();
            }

            writer.WriteElementString(XmlNameListOwnedOnly, ListOwnedOnly.ToString());
            writer.WriteElementString(XmlNameListWeightFactor, ListWeightFactor.ToString());
            writer.WriteElementString(XmlNameListMinScore, ListMinScore.ToString());
            writer.WriteElementString(XmlNameListTagsPerGame, ListTagsPerGame.ToString());
            writer.WriteElementString(XmlNameListScoreSort, ListScoreSort.ToString());
            writer.WriteElementString(XmlNameListExcludeGenres, ListExcludeGenres.ToString());

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

            writer.WriteElementString(XmlName_Name, Name);
            if (!string.IsNullOrEmpty(Prefix))
            {
                writer.WriteElementString(XmlName_Prefix, Prefix);
            }
            writer.WriteElementString(XmlName_MaxTags, MaxTags.ToString());

            if (IncludedTags != null && IncludedTags.Count > 0)
            {
                writer.WriteStartElement(XmlName_TagList);
                foreach (string s in IncludedTags)
                {
                    writer.WriteElementString(XmlName_Tag, s);
                }
                writer.WriteEndElement();
            }

            writer.WriteElementString(XmlName_ListOwnedOnly, ListOwnedOnly.ToString());
            writer.WriteElementString(XmlName_ListWeightFactor, ListWeightFactor.ToString());
            writer.WriteElementString(XmlName_ListMinScore, ListMinScore.ToString());
            writer.WriteElementString(XmlName_ListTagsPerGame, ListTagsPerGame.ToString());
            writer.WriteElementString(XmlName_ListScoreSort, ListScoreSort.ToString());
            writer.WriteElementString(XmlName_ListExcludeGenres, ListExcludeGenres.ToString());

            writer.WriteEndElement();
        }