void SendRequestStream() { if (_entity.Stream.CanSeek) { _request.ContentLength = _entity.Stream.Length; } var streamToWriteTo = _request.GetRequestStream(); if (_entity.Stream.CanSeek) { streamToWriteTo = new ProgressStream(_entity.Stream.Length, RaiseProgress, streamToWriteTo); } _entity.Stream.CopyTo(streamToWriteTo); }
void SendRequestStream() { if (_entity.Stream.CanSeek) _request.ContentLength = _entity.Stream.Length; var streamToWriteTo = _request.GetRequestStream(); if (_entity.Stream.CanSeek) streamToWriteTo = new ProgressStream(_entity.Stream.Length, RaiseProgress, streamToWriteTo); _entity.Stream.CopyTo(streamToWriteTo); }