/// <summary>
 /// Wrap a stream to de-chunk.
 /// </summary>
 public HttpChunkedStreamWrapper(Stream source, TimeSpan timeout)
 {
     _source   = source ?? throw new ArgumentNullException(nameof(source));
     _timeout  = timeout;
     _complete = false;
     _buffer   = new PushbackBuffer();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Wrap a stream to de-chunk.
 /// </summary>
 public HttpChunkedStreamWrapper(Stream source, TimeSpan timeout)
 {
     _source = source;
     _timeout = timeout;
     _complete = false;
     _buffer = new PushbackBuffer();
 }
 /// <summary>
 /// Wrap a stream to de-chunk.
 /// </summary>
 public HttpChunkedStreamWrapper(Stream source, TimeSpan timeout)
 {
     _source   = source;
     _timeout  = timeout;
     _complete = false;
     _buffer   = new PushbackBuffer();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a pushback wrapper around another stream.
 /// You should not directly interact with the stream after this.
 /// </summary>
 /// <param name="baseStream"></param>
 public PushbackInputStream(Stream baseStream)
 {
     _baseStream = baseStream;
     _position = _baseStream.Position;
     _pushbackBuffer = new PushbackBuffer(_baseStream);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Create a pushback wrapper around another stream.
 /// You should not directly interact with the stream after this.
 /// </summary>
 /// <param name="baseStream"></param>
 public PushbackInputStream(Stream baseStream)
 {
     _baseStream     = baseStream;
     _position       = _baseStream.Position;
     _pushbackBuffer = new PushbackBuffer(_baseStream);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Create a pushback wrapper around another stream.
 /// You should not directly interact with the stream after this.
 /// </summary>
 /// <param name="baseStream"></param>
 public PushbackInputStream(Stream baseStream)
 {
     _baseStream     = baseStream ?? throw new ArgumentNullException(nameof(baseStream));
     _position       = _baseStream.Position;
     _pushbackBuffer = new PushbackBuffer(_baseStream);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Internal, for proxy generation in tests
 /// </summary>
 protected PushbackInputStream()
 {
     _baseStream     = new MemoryStream();
     _pushbackBuffer = new PushbackBuffer(_baseStream);
 }