public bool Execute() { if (_jobs.Count > 0) { currJob = _jobs.Dequeue(); currJob.ExecuteJob(_zel10Client, NetworkAddresses.ServerAddress); return(true); } return(false); }
void _zel10Client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e) { try { _results[currJob.JobName()] = e.Result; } catch { _results[currJob.JobName()] = "FAIL"; BatchOperationCompleted(sender, _results); } if (_jobs.Count > 0) { currJob = _jobs.Dequeue(); currJob.ExecuteJob(_zel10Client, NetworkAddresses.ServerAddress); } else { BatchOperationCompleted(sender, _results); } }