Example #1
0
 protected override void DoJob()
 {
     foreach (var file in directoryFiles)
     {
         var filePath = file.Substring(mappedPath.TrimEnd('/').Length);
         StaticUploader.UploadFileAsync(Path.Combine(relativePath, filePath), file, (res) => StepDone()).Wait();
     }
 }
Example #2
0
        protected override async Task DoJobAsync()
        {
            var tasks = new List <Task>();

            foreach (var file in directoryFiles)
            {
                var filePath = file.Substring(mappedPath.TrimEnd('/').Length);
                tasks.Add(StaticUploader.UploadFileAsync(Path.Combine(relativePath, filePath), file, (res) => StepDone()));
            }

            await Task.WhenAll(tasks);
        }