Esempio n. 1
0
 public override void WriteMessage(MessageInfo info, List <MessageData> data)
 {
     using (var telecom = new FTPSClient(TaskInfo["Host"], TaskInfo["Login"], TaskInfo.GetPassword(), TaskInfo.Get("Port", 21), TaskInfo.Get("UseSSL", false), TaskInfo.Get("Timeout", 60000))
     {
         ActiveMode = TaskInfo.Get("ActiveMode", false)
     })
     {
         if (!TaskInfo["Path"].IsEmpty())
         {
             telecom.ChangeDir(TaskInfo["Path"]);
         }
         foreach (var msg in data)
         {
             msg.Name = msg.Name.Trim().Replace(' ', '_');
             telecom.UploadFile(msg.Name.Trim(), msg.Stream);
         }
     }
 }