示例#1
0
        public void CreateSite(string inputUrl)
        {
            List <Request> requestList = new GetSiteMap(inputUrl).requests;
            Site           site        = new Site
            {
                RequestIp   = HttpContext.Current.Request.UserHostAddress,
                Url         = inputUrl,
                Requests    = requestList,
                SummaryTime = new TimeCounter(requestList).time,
                CreateTime  = DateTime.Now,
                SiteAmount  = requestList.Count()
            };

            DataBase.Sites.Create(site);
            DataBase.Save();
        }
        public void Test_workable_of_method()
        {
            var method = new GetSiteMap("www.google.com/sitemap.xml");

            Assert.IsNotNull(method.requests);
        }