private void RaiseProgressEvent() { // Raise the event by using the () operator. if (ProgressEvent != null) { PumpProgressEventArgs args = new PumpProgressEventArgs(); args.BytesRead = BytesRead; args.BytesWritten = BytesWritten; args.SourcePosition = InputStream.Position; args.DestinationPosition = OutputStream.Position; ProgressEvent(this, args); } }