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