FileInfoEventArgs.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. namespace SevenZip
  2. {
  3. /// <summary>
  4. /// EventArgs used to report the file information which is going to be packed.
  5. /// </summary>
  6. public sealed class FileInfoEventArgs : PercentDoneEventArgs, ICancellable
  7. {
  8. /// <summary>
  9. /// Initializes a new instance of the FileInfoEventArgs class.
  10. /// </summary>
  11. /// <param name="fileInfo">The current ArchiveFileInfo.</param>
  12. /// <param name="percentDone">The percent of finished work.</param>
  13. public FileInfoEventArgs(ArchiveFileInfo fileInfo, byte percentDone)
  14. : base(percentDone)
  15. {
  16. FileInfo = fileInfo;
  17. }
  18. /// <summary>
  19. /// Gets or sets whether to stop the current archive operation.
  20. /// </summary>
  21. public bool Cancel { get; set; }
  22. /// <summary>
  23. /// Gets or sets whether to skip the current file.
  24. /// </summary>
  25. public bool Skip { get; set; }
  26. /// <summary>
  27. /// Gets the corresponding FileInfo to the event.
  28. /// </summary>
  29. public ArchiveFileInfo FileInfo { get; }
  30. }
  31. }