using System;
using Renci.SshNet.Common;
namespace Renci.SshNet.Sftp
{
///
/// Encapsulates the results of an asynchronous download operation.
///
public class SftpDownloadAsyncResult : AsyncResult
{
///
/// Gets or sets a value indicating whether to cancel asynchronous download operation.
///
///
/// true if download operation to be canceled; otherwise, false.
///
///
/// Download operation will be canceled after finishing uploading current buffer.
///
public bool IsDownloadCanceled { get; set; }
///
/// Gets the number of downloaded bytes.
///
public ulong DownloadedBytes { get; private set; }
///
/// Initializes a new instance of the class.
///
/// The async callback.
/// The state.
public SftpDownloadAsyncResult(AsyncCallback asyncCallback, object state)
: base(asyncCallback, state)
{
}
///
/// Updates asynchronous operation status information.
///
/// Number of downloaded bytes.
internal void Update(ulong downloadedBytes)
{
DownloadedBytes = downloadedBytes;
}
}
}