SlotUtil.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Ips.Library.LocLib
  7. {
  8. public static class SlotUtil
  9. {
  10. public static IEnumerable<SlotBuffer> Each(string file1, string file2, List<CorSlot> slots, int addzero = 0, double offsetTime = 0d)
  11. {
  12. using var fs1 = new FileStream(file1, FileMode.Open, FileAccess.Read, FileShare.Read);
  13. using var fs2 = new FileStream(file2, FileMode.Open, FileAccess.Read, FileShare.Read);
  14. yield break;
  15. }
  16. }
  17. public class CorSlot
  18. {
  19. public CorSlot(int start, int length) : this(start, length, start, length)
  20. {
  21. }
  22. public CorSlot(int start1, int length1, int start2, int length2)
  23. {
  24. this.Start1 = start1;
  25. this.Length1 = length1;
  26. this.Start2 = start2;
  27. this.Length2 = length2;
  28. }
  29. public int Start1 { get; set; }
  30. public int Length1 { get; set; }
  31. public int Start2 { get; set; }
  32. public int Length2 { get; set; }
  33. }
  34. public class SlotBuffer
  35. {
  36. public SlotBuffer()
  37. {
  38. }
  39. public SlotBuffer(byte[] buf1, byte[] buf2)
  40. {
  41. Buf1 = buf1;
  42. Buf2 = buf2;
  43. }
  44. public byte[] Buf1 { get; set; }
  45. public byte[] Buf2 { get; set; }
  46. }
  47. }