Exemplo n.º 1
0
 internal HttpResponseBody(
     Stream rawResponseStream,
     TcpSettings tcpSettings,
     HttpSettings httpSettings,
     IHttpResponse response,
     ILogger logger)
 {
     Validation.RequireValidHttpSettings(httpSettings);
     Validation.RequireValidTcpSettings(tcpSettings);
     _tcpSettings = tcpSettings;
     _logger      = logger
                    ?? throw new ArgumentNullException(nameof(logger));
     _rawResponseStream = rawResponseStream
                          ?? throw new ArgumentNullException(nameof(rawResponseStream));
     _response = response
                 ?? throw new ArgumentNullException(nameof(response));
     _httpSettings    = httpSettings;
     _buffer          = new MemoryStream(httpSettings.MaxBodyChunkSize);
     _buffer.Position = 0;
 }
Exemplo n.º 2
0
 public void SetHttpSettings(HttpSettings httpSettings)
 {
     Validation.RequireValidHttpSettings(httpSettings);
     _httpSettings = httpSettings;
 }