Example #1
0
 public async Task ReportToAPI(List <WorkerReportItem> ritems)
 {
     using (HttpClient client = new HttpClient())
     {
         try
         {
             DomainInfo.DomainInfoClient swclient = new DomainInfo.DomainInfoClient(this.url, client);
             await swclient.WorkerAsync(taskname, ritems);
         }
         catch (Exception ex)
         {
             OnException(ex);
         }
     }
 }
Example #2
0
 public async Task Request()
 {
     using (HttpClient client = new HttpClient())
     {
         try
         {
             DomainInfo.DomainInfoClient swclient = new DomainInfo.DomainInfoClient(this.url, client);
             var result = (await swclient.WorkerAllAsync(taskname)).ToList();
             queue.AddRange(result);
         }
         catch (Exception ex)
         {
             OnException(ex);
         }
     }
 }