コード例 #1
0
 public DownloadFileFromServer(DropBoxEvent @event, ICloudStorage cloudStorage, LocalFolderRoot root)
 {
     this.serverPath   = @event.ServerPath;
     this.Title        = "Download : " + this.serverPath.Value;
     this.cloudStorage = cloudStorage;
     this.root         = root;
 }
コード例 #2
0
        public async Task UploadDownload(string path)
        {
            var lpath = new LocalPath(this.root.Value + path, this.root);
            var localFileSystemEvent = new LocalFileSystemEvent(lpath, "");

            try
            {
                var delete = new DeleteFileOnServerOperation(localFileSystemEvent, this.dropBoxCloudStorage);
                await delete.Execute(CancellationToken.None);
            }
            catch (Exception)
            {
            }

            var upload = new UploadFileToServerOperation(localFileSystemEvent, this.dropBoxCloudStorage);
            await upload.Execute(CancellationToken.None);


            var dropBoxEvent = new DropBoxEvent(lpath.ToServerPath(), "");
            var download     = new DownloadFileFromServer(dropBoxEvent, this.dropBoxCloudStorage, this.root);
            await download.Execute(CancellationToken.None);
        }
コード例 #3
0
 public void Add(DropBoxEvent @event)
 {
     this.Events.Add(@event);
 }