コード例 #1
0
        public void DownloadFile(string fileId, Stream stream, CancellationToken token = new CancellationToken())
        {
            var command = new DownloadFileCommand(this, fileId, stream, Settings, token, WebProxy);
            command.FileDownloadProgressChanged += command_FileDownloadProgressChanged;

            command.Execute();
        }
コード例 #2
0
        public void DownloadFile(FileCompact file, Stream stream, CancellationToken token = new CancellationToken())
        {
            var command = new DownloadFileCommand(this, file, stream, Settings, token, WebProxy);

            command.FileDownloadProgressChanged += command_FileDownloadProgressChanged;

            command.Execute();
        }
コード例 #3
0
        public void DownloadFile(FileCompact file, string filePath, int maxChunkSize, int maxThreadCount,
                                 CancellationToken token = new CancellationToken())
        {
            var command = new DownloadFileCommand(this, file, filePath, Settings, maxThreadCount, maxChunkSize, token);

            command.FileDownloadProgressChanged += command_FileDownloadProgressChanged;
            command.Execute();
        }
コード例 #4
0
        public void DownloadFile(FileCompact file, string filePath, CancellationToken token = new CancellationToken())
        {
            var command = new DownloadFileCommand(this, file, filePath, Settings, token);
            command.FileDownloadProgressChanged += command_FileDownloadProgressChanged;

            command.Execute();
        }
コード例 #5
0
        public Task DownloadFileTaskByIdAsync(string fileId, Stream stream, CancellationToken token = new CancellationToken())
        {
            var command = new DownloadFileCommand(this, fileId, stream, ClientSettings, token);
            command.FileDownloadProgressChanged += command_FileDownloadProgressChanged;

            return Task.Factory.StartNew(command.Execute, token);
        }