コード例 #1
0
ファイル: PollManager.cs プロジェクト: weeble/ohos
 public PollManager(IUrlPoller aUrlPoller)
 {
     MinPollingInterval = TimeSpan.FromSeconds(15);
     MaxAppPollingInterval = TimeSpan.FromMinutes(5); // TODO: Lengthen polling interval for normal use.
     iUrlPoller = aUrlPoller;
 }
コード例 #2
0
ファイル: PollManager.cs プロジェクト: weeble/ohos
 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;
     }
 }