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); }
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); }
public DateTime GetPageLastPublishedDate(string url) { return(_pageFactory.GetLastPublishedDateByUrl(url)); }