Exemplo n.º 1
0
 public void Skip(long steps)
 {
     Offset = steps;
     if (targetStreams.CanSeek)
     {
         targetStreams.Seek(steps);
     }
 }
Exemplo n.º 2
0
        public void SetRequestStream(Stream requestStream, string contentType, long contentLength = -1, bool disposeWhenReset = true)
        {
            RequestStreams = new StreamCollection(new Stream[] { requestStream });
            RequestStreams.Seek(0);
            needDisposeWhenReset = disposeWhenReset;

            LogHelper.OnlineLogger.Debug(string.Format("Set ContentLength={0},ContentType={1}", requestStream.Length, contentType));
            //OriginalRequest.ContentLength = contentLength == -1 ? RequestStreams.Length : contentLength;
            OriginalRequest.ContentType = contentType;

            //OriginalRequest.AllowWriteStreamBuffering = false;
        }