Example #1
0
 public List<Job> GetJobList(Storage destination)
 {
     List<Job> list = new List<Job>();
       if (this.Status.TerseStatus == StorageStatus.Ready || this.Status.TerseStatus == StorageStatus.Locked)
       {
     foreach (JobProvider jobProvider in this.JobProviders)
       list.AddRange((IEnumerable<Job>) jobProvider.GetJobList(this, destination));
       }
       return list;
 }
Example #2
0
 public SA_StorageWorker Transfer(Job job, Storage destination)
 {
     SA_StorageWorker saStorageWorker;
       if (destination is LocalStorage)
       {
     saStorageWorker = new SA_StorageWorker(job);
     saStorageWorker.DoWork += new DoWorkEventHandler(this.bw_Transfer_DoWork);
       }
       else
       {
     saStorageWorker = new SA_StorageWorker(job);
     saStorageWorker.DoWork += new DoWorkEventHandler(destination.bw_Transfer_DoWork);
       }
       return saStorageWorker;
 }
Example #3
0
 public virtual List<Job> GetJobList(Storage source, Storage destination)
 {
     List<Job> list = new List<Job>();
       for (int index = 0; index < this.Content.Rows.Count; ++index)
       {
     DataRow dataRow = this.Content.Rows[index];
     switch (this.Input)
     {
       case ProviderInput.Filnavn:
     list.Add(new Job(dataRow["Navn"].ToString(), source, destination));
     break;
       case ProviderInput.MD5:
     list.Add(new Job(dataRow["Navn"].ToString(), source, destination, dataRow["MD5"].ToString()));
     break;
       case ProviderInput.FileSize:
     list.Add(new Job(dataRow["Navn"].ToString(), source, destination, (long) dataRow["Størrelse"]));
     break;
       case ProviderInput.FileSizeAndMD5:
     list.Add(new Job(dataRow["Navn"].ToString(), source, destination, dataRow["MD5"].ToString(), (long) dataRow["Størrelse"]));
     break;
     }
       }
       return list;
 }