/// <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); } }
private void OnBytesWritten(IntEventArgs e) { BytesWritten?.Invoke(this, e); }
private void OnBytesWritten(IntEventArgs e) { //Debug.WriteLine("OnBytesWritten: " + e.Value); BytesWritten?.Invoke(this, e); }
protected virtual void OnBytesWritten(int bytesMoved) => BytesWritten?.Invoke(this, new ProgressStreamReportEventArgs(bytesMoved, innerStream.Length, innerStream.Position, false));