SftpSynchronizeDirectoriesAsyncResult.cs 1.2 KB

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