async protected override Task DownloadImplementation() { await client.LoginAnonymousAsync(); Uri folderLink = new Uri(url); INodeInfo node = client.GetNodeFromLink(folderLink); IProgress <double> progressHandler = new Progress <double>(x => ShowProgress(x)); await client.DownloadFileAsync(folderLink, node.Name, progressHandler); await client.LogoutAsync(); }
public void DownloadFile(INode node, string outputFile, CancellationToken?cancellationToken = null) { var progress = new Progress <double>(); UnwrapException(() => _client.DownloadFileAsync(node, outputFile, progress, cancellationToken).Wait()); }