public ChunkedStream(IHttpReader reader) { if (null == reader) throw new ArgumentNullException(nameof(reader)); _reader = reader; }
public void Dispose() { Stream stream = this._stream; if (null != stream) { this._stream = (Stream)null; stream.Dispose(); } IHttpReader httpReader = this._reader; if (null != httpReader) { this._reader = (IHttpReader)null; httpReader.Dispose(); } IHttpConnection httpConnection = this._connection; if (null == httpConnection) { return; } this._connection = httpConnection; httpConnection.Dispose(); }
public RottenTomatoesService(IStuffLibrarySettings settings, IHttpReader reader) { _settings = settings; _reader = reader; _reader.Accept = "application/json"; _urls = new ApiUrls(_settings); }
public void Dispose() { var stream = ContentReadStream; if (null != stream) { ContentReadStream = null; stream.Dispose(); } var reader = _reader; if (null != reader) { _reader = null; reader.Dispose(); } var connection = _connection; if (null != connection) { _connection = connection; connection.Dispose(); } }
public HttpConnectionResponse(Uri url, IHttpConnection connection, IHttpReader reader, Stream stream, ILookup <string, string> headers, IHttpStatus status) { if ((Uri)null == url) { throw new ArgumentNullException("url"); } if (null == stream) { throw new ArgumentNullException("stream"); } if (null == headers) { throw new ArgumentNullException("headers"); } if (null == status) { throw new ArgumentNullException("status"); } this._url = url; this._reader = reader; this._stream = stream; this._headers = headers; this._status = status; this._connection = connection; }
public ChunkedStream(IHttpReader reader) { if (null == reader) { throw new ArgumentNullException("reader"); } this._reader = reader; }
public ContentLengthStream(IHttpReader reader, long? contentLength) { if (null == reader) throw new ArgumentNullException(nameof(reader)); _reader = reader; _contentLength = contentLength; }
public SearchController( IHttpReader reader, IConfigurationProvider config, IModel <string> model, SessionFactory sessionFactory) : base(config, sessionFactory) { _reader = reader; _model = model; }
public ContentLengthStream(IHttpReader reader, long?contentLength) { if (null == reader) { throw new ArgumentNullException("reader"); } this._reader = reader; this._contentLength = contentLength; }
public HttpConnectionResponse(Uri url, IHttpConnection connection, IHttpReader reader, Stream stream, ILookup<string, string> headers, IHttpStatus status) { if (null == url) throw new ArgumentNullException(nameof(url)); if (null == stream) throw new ArgumentNullException(nameof(stream)); if (null == headers) throw new ArgumentNullException(nameof(headers)); if (null == status) throw new ArgumentNullException(nameof(status)); ResponseUri = url; _reader = reader; ContentReadStream = stream; Headers = headers; Status = status; _connection = connection; }
public static async Task <string> ReadNonBlankLineAsync(this IHttpReader httpReader, CancellationToken cancellationToken) { string line; do { line = await httpReader.ReadLineAsync(cancellationToken).ConfigureAwait(false); if (null == line) { goto label_2; } }while (string.IsNullOrWhiteSpace(line)); goto label_4; label_2: string str = (string)null; goto label_6; label_4: str = line; label_6: return(str); }
public QueryController(IHttpReader reader, ITextModel tokenizer, ILogger <QueryController> logger) { _reader = reader; _model = tokenizer; _logger = logger; }
public QueryController(IHttpReader reader, IModel <string> model, ILogger <QueryController> logger) { _reader = reader; _model = model; _logger = logger; }