IStreamHelper.cs 835 B

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