Exemple #1
0
 /// <summary>
 ///     Called when bytes are written
 /// </summary>
 /// <param name="bytesMoved">int with the number of bytes</param>
 protected virtual void OnBytesWritten(int bytesMoved)
 {
     if (bytesMoved != 0 && BytesWritten != null)
     {
         long length   = 0;
         long position = 0;
         if (_innerStream.CanSeek)
         {
             length   = _innerStream.Length;
             position = _innerStream.Position;
         }
         var args = new ProgressStreamReport(bytesMoved, length, position, false);
         BytesWritten?.Invoke(this, args);
     }
 }
Exemple #2
0
 private void OnBytesWritten(IntEventArgs e)
 {
     BytesWritten?.Invoke(this, e);
 }
Exemple #3
0
 private void OnBytesWritten(IntEventArgs e)
 {
     //Debug.WriteLine("OnBytesWritten: " + e.Value);
     BytesWritten?.Invoke(this, e);
 }
Exemple #4
0
 protected virtual void OnBytesWritten(int bytesMoved) => BytesWritten?.Invoke(this, new ProgressStreamReportEventArgs(bytesMoved, innerStream.Length, innerStream.Position, false));