private void OnBytesRead(IntEventArgs e) { if (this.BytesRead == null) { return; } this.BytesRead((object)this, e); }
private void OnBytesWritten(IntEventArgs e) { if (this.BytesWritten == null) { return; } this.BytesWritten((object)this, e); }
private void IntEventArgsHandler(object sender, IntEventArgs e) { lock (this) { byte num = (byte)(this._BytesWrittenOld * 100L / this._BytesCount); this._BytesWritten += (long)e.Value; byte percentDone = (byte)(this._BytesWritten * 100L / this._BytesCount); if ((int)percentDone <= (int)num) { return; } this._BytesWrittenOld = this._BytesWritten; this.OnCompressing(new ProgressEventArgs(percentDone, (byte)((uint)percentDone - (uint)num))); } }
private void IntEventArgsHandler(object sender, IntEventArgs e) { int num1 = (int)(this._BytesWrittenOld * 100L / this._BytesCount); this._BytesWritten += (long)e.Value; int num2 = (int)(this._BytesWritten * 100L / this._BytesCount); if (num2 <= num1) { return; } if (num2 > 100) { num1 = num2 = 0; } this._BytesWrittenOld = this._BytesWritten; this.OnExtracting(new ProgressEventArgs((byte)num2, (byte)(num2 - num1))); }