public override int Read(byte[] buffer, int offset, int count)
            {
                token.ThrowIfCancellationRequested();
                int num = ParentStream.Read(buffer, offset, count);

                ReadCallback(num);
                return(num);
            }
예제 #2
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     token.ThrowIfCancellationRequested();
     try {
         var readCount = ParentStream.Read(buffer, offset, count);
         ReadCallback(readCount);
         return(readCount);
     } catch (Exception e) {
         if (exceptionMapper != null)
         {
             exceptionMapper(e);
         }
         throw e;
     }
 }
예제 #3
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     return(ParentStream.Read(buffer, offset, count));
 }
예제 #4
0
        public override int Read(byte[] buffer, int offset, int count)
        {
            count = Math.Min((int)Math.Max(Length - Position, (long)0), count);

            return(ParentStream.Read(buffer, offset, count));
        }