コード例 #1
0
        public override void WriteToXml(XmlWriter writer)
        {
            writer.WriteStartElement(TypeIdString);

            writer.WriteElementString(XmlName_Name, Name);
            if (Filter != null)
            {
                writer.WriteElementString(XmlName_Filter, Filter);
            }
            if (Prefix != null)
            {
                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, List_OwnedOnly.ToString().ToLowerInvariant());
            writer.WriteElementString(XmlName_ListWeightFactor, List_WeightFactor.ToString());
            writer.WriteElementString(XmlName_ListMinScore, List_MinScore.ToString());
            writer.WriteElementString(XmlName_ListTagsPerGame, List_TagsPerGame.ToString());
            writer.WriteElementString(XmlName_ListScoreSort, List_ScoreSort.ToString().ToLowerInvariant());
            writer.WriteElementString(XmlName_ListExcludeGenres, List_ExcludeGenres.ToString().ToLowerInvariant());

            writer.WriteEndElement();
        }
コード例 #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(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();
        }
コード例 #3
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();
        }