public PollManager(IUrlPoller aUrlPoller) { MinPollingInterval = TimeSpan.FromSeconds(15); MaxAppPollingInterval = TimeSpan.FromMinutes(5); // TODO: Lengthen polling interval for normal use. iUrlPoller = aUrlPoller; }
public void PollNow(IUrlPoller aPoller) { if (iCancelled) return; switch (aPoller.Poll(iUrl, iLastModified)) { case DownloadAvailableState.Available: iReadyAction(); return; case DownloadAvailableState.Error: iFailedAction(); return; case DownloadAvailableState.NotAvailable: return; } }