Table of Contents

Class StreamingCollectionEndpoint<TEntity, TElementEndpoint>

Namespace
TypedRest.Endpoints.Reactive
Assembly
TypedRest.Reactive.dll

Endpoint for a collection of TEntitys observable as an append-only stream using long-polling.

public class StreamingCollectionEndpoint<TEntity, TElementEndpoint> : CollectionEndpoint<TEntity, TElementEndpoint>, ICachingEndpoint, IStreamingCollectionEndpoint<TEntity, TElementEndpoint>, ICollectionEndpoint<TEntity, TElementEndpoint>, IIndexerEndpoint<TElementEndpoint>, IEndpoint where TEntity : class where TElementEndpoint : class, IElementEndpoint<TEntity>

Type Parameters

TEntity

The type of entity the endpoint represents.

TElementEndpoint

The type of IEndpoint to provide for individual TEntitys. Must have a public constructor with an IEndpoint and an Uri or string parameter.

Inheritance
CollectionEndpoint<TEntity, TElementEndpoint>
StreamingCollectionEndpoint<TEntity, TElementEndpoint>
Implements
IStreamingCollectionEndpoint<TEntity, TElementEndpoint>
ICollectionEndpoint<TEntity, TElementEndpoint>
IIndexerEndpoint<TElementEndpoint>
Derived
Inherited Members
Extension Methods

Constructors

StreamingCollectionEndpoint(IEndpoint, string)

Creates a new streaming collection endpoint.

public StreamingCollectionEndpoint(IEndpoint referrer, string relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri string

The URI of this endpoint relative to the referrer's. Add a ./ prefix here to imply a trailing slash referrer's URI.

StreamingCollectionEndpoint(IEndpoint, Uri)

Creates a new streaming collection endpoint.

public StreamingCollectionEndpoint(IEndpoint referrer, Uri relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri Uri

The URI of this endpoint relative to the referrer's.

Methods

GetObservable(long)

Provides an observable stream of elements. The observable is cold; HTTP communication only starts on Subscribe(IObserver<T>).

public IObservable<TEntity> GetObservable(long startIndex = 0)

Parameters

startIndex long

The index of the first element to return in the stream. Use negative values to start counting from the end of the stream.

Returns

IObservable<TEntity>