Class StreamingEndpoint<TEntity>
Endpoint for a stream of TEntity
s using a persistent HTTP connection.
public class StreamingEndpoint<TEntity> : EndpointBase, IStreamingEndpoint<TEntity>, IEndpoint
Type Parameters
TEntity
The type of individual elements in the stream.
- Inheritance
-
StreamingEndpoint<TEntity>
- Implements
-
IStreamingEndpoint<TEntity>
- Inherited Members
Constructors
StreamingEndpoint(IEndpoint, string, string)
Creates a new streaming endpoint.
public StreamingEndpoint(IEndpoint referrer, string relativeUri, string separator = "\n")
Parameters
referrer
IEndpointThe endpoint used to navigate to this one.
relativeUri
stringThe URI of this endpoint relative to the
referrer
's. Add a./
prefix here to imply a trailing slashreferrer
's URI.separator
stringThe character sequence used to detect that a new element starts in an HTTP stream.
StreamingEndpoint(IEndpoint, Uri, string)
Endpoint for a stream of TEntity
s using a persistent HTTP connection.
public StreamingEndpoint(IEndpoint referrer, Uri relativeUri, string separator = "\n")
Parameters
referrer
IEndpointThe endpoint used to navigate to this one.
relativeUri
UriThe URI of this endpoint relative to the
referrer
's.separator
stringThe character sequence used to detect that a new element starts in an HTTP stream.
Properties
BufferSize
The size of the buffer used to collect data for deserialization in bytes.
public int BufferSize { get; set; }
Property Value
Methods
GetObservable()
Provides an observable stream of entities. The observable is cold; HTTP communication only starts on Subscribe(IObserver<T>).
public virtual IObservable<TEntity> GetObservable()
Returns
- IObservable<TEntity>