示例#1
0
        public override Manga GetManga(String Address)
        {

            String RssAddress = GetRssAddress(Address);
            String RssData = GetRssData(RssAddress);
            XmlDocument XmlData = new XmlDocument();
            Manga ReturnData = new Manga();

            try {

                XmlData.LoadXml(RssData);
                XmlNode RootElement = XmlData.ChildNodes[2].ChildNodes[0];

                Chapter LatestChapter = new Chapter();
                LatestChapter.Number = GetChapterNumber(RootElement.ChildNodes[6].ChildNodes[1].InnerText);
                LatestChapter.Uri = RootElement.ChildNodes[6].ChildNodes[1].InnerText;

                ReturnData.LatestChapter = LatestChapter;
                ReturnData.Provider = this;
                ReturnData.Title = RootElement.ChildNodes[0].InnerText;
                ReturnData.Updated = Convert.ToDateTime(RootElement.ChildNodes[6].ChildNodes[3].InnerText);
                ReturnData.Uri = String.Format("http://mangafox.me/manga/{0}/", GetNameFromAddress(Address));

            }

            catch (Exception E)
            {

                return null;

            }

            return ReturnData;

        }
示例#2
0
        protected Manga(SerializationInfo Info, StreamingContext Context)
        {

            if (Info == null)
            {

                throw new System.ArgumentNullException("Info");

            }
            
            _LatestChapter = (Chapter)Info.GetValue("LatestChapter", typeof(Chapter));
            _LatestReadChapter = (Chapter)Info.GetValue("LatestReadChapter", typeof(Chapter));
            _Provider = ProviderFactory.GetProvider((String)Info.GetValue("Provider", typeof(String))); ;
            _Title = (String)Info.GetValue("Title", typeof(String));
            _Updated = (DateTime)Info.GetValue("Updated", typeof(DateTime));
            _Uri = (String)Info.GetValue("Uri", typeof(String));

        }
示例#3
0
        public Manga()
        {

            _LatestChapter = new Chapter();
            _LatestReadChapter = new Chapter();
            _Provider = null;
            _Title = String.Empty;
            _Updated = DateTime.MinValue;
            _Uri = String.Empty;

        }