Beispiel #1
0
 /// <summary>
 ///     Called when bytes are read.
 /// </summary>
 /// <param name="bytesMoved">int with the number of bytes</param>
 protected virtual void OnBytesRead(int bytesMoved)
 {
     if (bytesMoved != 0 && BytesRead != null)
     {
         long length   = 0;
         long position = 0;
         if (_innerStream.CanSeek)
         {
             length   = _innerStream.Length;
             position = _innerStream.Position;
         }
         var args = new ProgressStreamReport(bytesMoved, length, position, true);
         BytesRead?.Invoke(this, args);
     }
 }
 public void Report(int bytesRead)
 {
     BytesRead?.Invoke(bytesRead);
 }
Beispiel #3
0
 private void OnBytesRead(IntEventArgs e)
 {
     BytesRead?.Invoke(this, e);
 }
 private void RaiseBytesReadEvent(int byteCount)
 {
     BytesRead?.Invoke(byteCount);
 }