SftpListDirectoryAsyncResult.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using Renci.SshNet.Common;
  4. namespace Renci.SshNet.Sftp
  5. {
  6. /// <summary>
  7. /// Encapsulates the results of an asynchronous directory list operation.
  8. /// </summary>
  9. public class SftpListDirectoryAsyncResult : AsyncResult<IEnumerable<SftpFile>>
  10. {
  11. /// <summary>
  12. /// Gets the number of files read so far.
  13. /// </summary>
  14. public int FilesRead { get; private set; }
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="SftpListDirectoryAsyncResult"/> class.
  17. /// </summary>
  18. /// <param name="asyncCallback">The async callback.</param>
  19. /// <param name="state">The state.</param>
  20. public SftpListDirectoryAsyncResult(AsyncCallback asyncCallback, Object state)
  21. : base(asyncCallback, state)
  22. {
  23. }
  24. /// <summary>
  25. /// Updates asynchronous operation status information.
  26. /// </summary>
  27. /// <param name="filesRead">The files read.</param>
  28. internal void Update(int filesRead)
  29. {
  30. this.FilesRead = filesRead;
  31. }
  32. }
  33. }