Esempio n. 1
0
 public TicketImportAgent(ITicketSource ticketSource, ITicketTarget ticketTarget, bool includeAttachments)
 {
     this.ticketSource = ticketSource;
     this.ticketTarget = ticketTarget;
     this.ticketTarget.OnPercentComplete += onPercentComplete;
     this.ticketSource.OnPercentComplete += onPercentComplete;
     this.includeAttachments = includeAttachments;
     downloadFolder = "";
     if (this.includeAttachments)
     {
         var directoryName = string.Format("{0}_to_{1}", this.ticketSource.Source, this.ticketTarget.Target);
         downloadFolder = Path.Combine(Path.GetTempPath(), directoryName);
         Directory.CreateDirectory(downloadFolder);
     }
 }
Esempio n. 2
0
 public TicketImportAgent(ITicketSource ticketSource, ITicketTarget ticketTarget, bool includeAttachments)
 {
     this.ticketSource = ticketSource;
     this.ticketTarget = ticketTarget;
     this.ticketTarget.OnPercentComplete += onPercentComplete;
     this.ticketSource.OnPercentComplete += onPercentComplete;
     this.includeAttachments              = includeAttachments;
     downloadFolder = "";
     if (this.includeAttachments)
     {
         var directoryName = string.Format("{0}_to_{1}", this.ticketSource.Source, this.ticketTarget.Target);
         downloadFolder = Path.Combine(Path.GetTempPath(), directoryName);
         Directory.CreateDirectory(downloadFolder);
     }
 }