Esempio n. 1
0
            /// <summary>
            /// Serializes this manager into Xml.
            /// </summary>
            /// <param name="doc">Document context</param>
            /// <returns>Returns new XmlElement that represents this</returns>
            public XmlElement SaveToXml(XmlDocument doc)
            {
                XmlElement elem         = doc.CreateElement(XmlName);
                XmlElement torrentsElem = doc.CreateElement("torrents");

                foreach (Torrent t in torrents.Values)
                {
                    torrentsElem.AppendChild(t.SaveToXml(doc));
                }
                elem.AppendChild(torrentsElem);

                elem.AppendChild(MyConnectInfo.SaveToXml(doc));
                elem.AppendElementWithValue("forceip", ForceIp.ToString());
                return(elem);
            }