Esempio n. 1
0
        public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
        {
            this.PageFactory = pageFactory;
            timer            = new Timer(
                new TimerCallback(CheckDependencyCallback),
                this, 0, pollTime);
            SitemapUrlPath = sitemapUrlPath;

            LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
        }
 public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
 {
     this.PageFactory = pageFactory;
     timer = new Timer(
         new TimerCallback(CheckDependencyCallback),
         this, 0, pollTime);
     SitemapUrlPath = sitemapUrlPath;
     
     LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
 }
Esempio n. 3
0
        private void CheckDependencyCallback(object sender)
        {
            IPageFactory pageFactory       = FactoryService.PageFactory;
            DateTime     lastPublishedDate = pageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);

            if (lastPublishedDate > LastPublishDate)
            {
                base.NotifyDependencyChanged(this, EventArgs.Empty);
                timer.Dispose();
            }
        }
        public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
        {
            if (pageFactory == null)
                throw new ArgumentNullException("pageFactory");

            this.PageFactory = pageFactory;
            timer = new Timer(
                new TimerCallback(CheckDependencyCallback),
                this, 0, pollTime);
            SitemapUrlPath = sitemapUrlPath;
            
            LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
        }
        public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
        {
            if (pageFactory == null)
            {
                throw new ArgumentNullException("pageFactory");
            }

            this.PageFactory = pageFactory;
            timer            = new Timer(
                new TimerCallback(CheckDependencyCallback),
                this, 0, pollTime);
            SitemapUrlPath = sitemapUrlPath;

            LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
        }
Esempio n. 6
0
 public DateTime GetPageLastPublishedDate(string url)
 {
     return(_pageFactory.GetLastPublishedDateByUrl(url));
 }