Exemplo n.º 1
0
 public void UploadPackage(string packagePath, string packageVersion)
 {
     _packageFtpsClient = GetNewFtpsClient();
     _packageFtpsClient.TransferProgress      += TransferProgressChangedEventHandler;
     _packageFtpsClient.PutFileAsyncCompleted += UploadPackageFinished;
     _packageFtpsClient.Open(Username, Password.ConvertToInsecureString());
     _packageFtpsClient.ChangeDirectoryMultiPath(Directory);
     _packageFtpsClient.MakeDirectory(packageVersion);
     _packageFtpsClient.ChangeDirectory(packageVersion);
     _packageFtpsClient.PutFileAsync(packagePath, FileAction.Create);
     _uploadPackageResetEvent.WaitOne();
     _packageFtpsClient.Close();
     _uploadPackageResetEvent.Reset();
 }