public void Start() { if (!Started) { Started = true; requests = new WorkerQueue <string>(4, TimeSpan.Zero, 10, true); requests.AddRange(urls); requests.Start(LoaderPortalPages); } }
public static void InitRequests() { var listUrls = new List <RequestItem> { new RequestItem("~/auth.aspx"), new RequestItem("~/confirm.aspx"), new RequestItem("~/default.aspx"), new RequestItem("~/feed.aspx"), new RequestItem("~/management.aspx?type=1"), new RequestItem("~/management.aspx?type=2"), new RequestItem("~/management.aspx?type=3"), new RequestItem("~/management.aspx?type=4"), new RequestItem("~/management.aspx?type=5"), new RequestItem("~/management.aspx?type=6"), new RequestItem("~/management.aspx?type=7"), new RequestItem("~/management.aspx?type=10"), new RequestItem("~/management.aspx?type=11"), new RequestItem("~/management.aspx?type=15"), new RequestItem("~/my.aspx"), new RequestItem("~/preparationportal.aspx"), new RequestItem("~/search.aspx"), new RequestItem("~/servererror.aspx"), new RequestItem("~/startscriptsstyles.aspx"), new RequestItem("~/tariffs.aspx"), new RequestItem("~/products/files/default.aspx"), new RequestItem("~/products/files/doceditor.aspx"), new RequestItem("~/products/crm/cases.aspx"), new RequestItem("~/products/crm/deals.aspx"), new RequestItem("~/products/crm/default.aspx"), new RequestItem("~/products/crm/help.aspx"), new RequestItem("~/products/crm/invoices.aspx"), new RequestItem("~/products/crm/mailviewer.aspx"), new RequestItem("~/products/crm/sender.aspx"), new RequestItem("~/products/crm/settings.aspx"), new RequestItem("~/products/crm/tasks.aspx"), new RequestItem("~/products/projects/contacts.aspx"), new RequestItem("~/products/projects/default.aspx"), new RequestItem("~/products/projects/ganttchart.aspx"), new RequestItem("~/products/projects/GeneratedReport.aspx"), new RequestItem("~/products/projects/help.aspx"), new RequestItem("~/products/projects/import.aspx"), new RequestItem("~/products/projects/messages.aspx"), new RequestItem("~/products/projects/milestones.aspx"), new RequestItem("~/products/projects/projects.aspx"), //new RequestItem("~/products/projects/projectteam.aspx"), new RequestItem("~/products/projects/projecttemplates.aspx"), new RequestItem("~/products/projects/reports.aspx"), new RequestItem("~/products/projects/tasks.aspx"), new RequestItem("~/products/projects/timer.aspx"), new RequestItem("~/products/projects/timetracking.aspx"), new RequestItem("~/products/projects/tmdocs.aspx"), new RequestItem("~/products/people/default.aspx"), new RequestItem("~/products/people/help.aspx"), new RequestItem("~/products/people/profile.aspx"), new RequestItem("~/products/people/profileaction.aspx"), new RequestItem("~/addons/mail/default.aspx"), new RequestItem("~/products/community/default.aspx"), new RequestItem("~/products/community/help.aspx"), new RequestItem("~/products/community/modules/birthdays/default.aspx"), new RequestItem("~/products/community/modules/blogs/addblog.aspx"), new RequestItem("~/products/community/modules/blogs/default.aspx"), new RequestItem("~/products/community/modules/blogs/editblog.aspx"), new RequestItem("~/products/community/modules/blogs/viewblog.aspx"), new RequestItem("~/products/community/modules/bookmarking/default.aspx"), new RequestItem("~/products/community/modules/bookmarking/createbookmark.aspx"), new RequestItem("~/products/community/modules/bookmarking/bookmarkinfo.aspx"), new RequestItem("~/products/community/modules/bookmarking/favouritebookmarks.aspx"), new RequestItem("~/products/community/modules/bookmarking/userbookmarks.aspx"), new RequestItem("~/products/community/modules/forum/default.aspx"), new RequestItem("~/products/community/modules/forum/edittopic.aspx"), new RequestItem("~/products/community/modules/forum/managementcenter.aspx"), new RequestItem("~/products/community/modules/forum/newforum.aspx"), new RequestItem("~/products/community/modules/forum/newpost.aspx"), new RequestItem("~/products/community/modules/forum/posts.aspx"), new RequestItem("~/products/community/modules/forum/search.aspx"), new RequestItem("~/products/community/modules/forum/topics.aspx"), new RequestItem("~/products/community/modules/forum/usertopics.aspx"), new RequestItem("~/products/community/modules/news/default.aspx"), new RequestItem("~/products/community/modules/news/editnews.aspx"), new RequestItem("~/products/community/modules/news/editpoll.aspx"), new RequestItem("~/products/community/modules/news/news.aspx"), //new RequestItem("~/products/community/modules/wiki/default.aspx"), new RequestItem("~/products/community/modules/wiki/diff.aspx"), new RequestItem("~/products/community/modules/wiki/listcategories.aspx"), new RequestItem("~/products/community/modules/wiki/listfiles.aspx"), new RequestItem("~/products/community/modules/wiki/listpages.aspx"), //new RequestItem("~/products/community/modules/wiki/pagehistorylist.aspx"), new RequestItem("~/addons/calendar/default.aspx") }; Progress = new StartupProgress { Total = listUrls.Count }; Requests.Stop(); Requests.Terminate(); Requests.AddRange(listUrls); Requests.Start(LoaderPortalPages); }
public void Start() { if (!Started) { Started = true; requests = new WorkerQueue<string>(4, TimeSpan.Zero, 10, true); requests.AddRange(urls); requests.Start(LoaderPortalPages); } }