IStreamHelper.cs 772 B

12345678910111213141516171819
  1. using System;
  2. using System.IO;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace MediaBrowser.Model.IO
  6. {
  7. public interface IStreamHelper
  8. {
  9. Task CopyToAsync(Stream source, Stream destination, int bufferSize, Action onStarted, CancellationToken cancellationToken);
  10. Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken);
  11. Task<int> CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken);
  12. Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken);
  13. Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken);
  14. }
  15. }