using System; using System.Threading; namespace Renci.SshNet { /// /// Provides additional information for asynchronous command execution /// public class CommandAsyncResult : IAsyncResult { /// /// Initializes a new instance of the class. /// internal CommandAsyncResult() { } /// /// Gets or sets the bytes received. If SFTP only file bytes are counted. /// /// Total bytes received. public int BytesReceived { get; set; } /// /// Gets or sets the bytes sent by SFTP. /// /// Total bytes sent. public int BytesSent { get; set; } #region IAsyncResult Members /// /// Gets a user-defined object that qualifies or contains information about an asynchronous operation. /// /// A user-defined object that qualifies or contains information about an asynchronous operation. public object AsyncState { get; internal set; } /// /// Gets a that is used to wait for an asynchronous operation to complete. /// /// A that is used to wait for an asynchronous operation to complete. public WaitHandle AsyncWaitHandle { get; internal set; } /// /// Gets a value that indicates whether the asynchronous operation completed synchronously. /// /// true if the asynchronous operation completed synchronously; otherwise, false. public bool CompletedSynchronously { get; internal set; } /// /// Gets a value that indicates whether the asynchronous operation has completed. /// /// true if the operation is complete; otherwise, false. public bool IsCompleted { get; internal set; } #endregion /// /// Gets a value indicating whether was already called for this /// . /// /// /// true if was already called for this ; /// otherwise, false. /// internal bool EndCalled { get; set; } } }