示例#1
0
 private static string GetFullFilePath(DownloadRequest request)
 {
     if (Path.IsPathRooted(request.FilePath) == false) {
         return Path.Combine(Directory.GetCurrentDirectory(), request.FilePath);
     }
     return request.FilePath;
 }
示例#2
0
        // ----- Public methods
        public DownloadResponse Execute(DownloadRequest request)
        {
            CheckFile(request.FilePath);

            var uploader = new Uploader(_clientInformation.CurrentConnection);
            uploader.Upload(request.FilePath);

            return new DownloadResponse
            {
                RemoteFilePath = GetFullFilePath(request)
            };
        }