Interface IHttpStreamProcessor
Interface for classes that process Streams for HTTP requests and responses.
Namespace: Tableau.Migration.Net
Assembly: Tableau.Migration.dll
Syntax
public interface IHttpStreamProcessor
Methods
ProcessAsync<TResponse>(Stream, Func<byte[], int, HttpRequestMessage>, CancellationToken)
Processes the stream in chunks and sends the created requests.
Declaration
Task<IEnumerable<IHttpResponseMessage<TResponse>>> ProcessAsync<TResponse>(Stream stream, Func<byte[], int, HttpRequestMessage> buildChunkRequest, CancellationToken cancel) where TResponse : class
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to process. |
Func<byte[], int, HttpRequestMessage> | buildChunkRequest | Function to build an HTTP request from a chunk of data from the stream. The first parameter is the chunk of data, or possibly a partial chunk of data. The second parameter is the count of bytes of the chunk of data to send. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IHttpResponseMessage<TResponse>>> | A collection of responses from the chunked requests. |
Type Parameters
Name | Description |
---|---|
TResponse | The response type. |