IOEventArgs.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. namespace PaintDotNet
  3. {
  4. public sealed class IOEventArgs
  5. : EventArgs
  6. {
  7. /// <summary>
  8. /// Whether we are reporting a Read or Write operation.
  9. /// </summary>
  10. private IOOperationType ioOperationType;
  11. public IOOperationType IOOperationType
  12. {
  13. get
  14. {
  15. return ioOperationType;
  16. }
  17. }
  18. /// <summary>
  19. /// The offset within the file that the operation is to begin, or has finished, at.
  20. /// </summary>
  21. private long position;
  22. public long Position
  23. {
  24. get
  25. {
  26. return position;
  27. }
  28. }
  29. /// <summary>
  30. /// The number of bytes that were read or written.
  31. /// </summary>
  32. private int count;
  33. public int Count
  34. {
  35. get
  36. {
  37. return count;
  38. }
  39. }
  40. public IOEventArgs(IOOperationType ioOperationType, long position, int count)
  41. {
  42. this.ioOperationType = ioOperationType;
  43. this.position = position;
  44. this.count = count;
  45. }
  46. }
  47. }