コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }