Class ClientObservableBase<T>

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Abstract base class for IClientObservable implementations, providing common async enumeration and connection dispatch via the template method HandleConnectionCore(IHttpRequestContext).

public abstract class ClientObservableBase<T> : IClientObservable, IAsyncEnumerable<T>

Type Parameters

T

Type of data being observed.

Inheritance
ClientObservableBase<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ClientObservableBase(ISubject<T>)

Abstract base class for IClientObservable implementations, providing common async enumeration and connection dispatch via the template method HandleConnectionCore(IHttpRequestContext).

protected ClientObservableBase(ISubject<T> subject)

Parameters

subject ISubject<T>

The System.Reactive.Subjects.ISubject<T> the observable wraps.

Properties

Subject

Gets the subject the observable wraps.

protected ISubject<T> Subject { get; }

Property Value

ISubject<T>

Methods

GetAsyncEnumerator(CancellationToken)

public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

IAsyncEnumerator<T>

GetAsynchronousEnumerator(CancellationToken)

Get an async enumerator for the observable.

public object GetAsynchronousEnumerator(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Optional CancellationToken.

Returns

object

Async enumerator.

HandleConnection(IHttpRequestContext)

Handle the HTTP request context.

public Task HandleConnection(IHttpRequestContext context)

Parameters

context IHttpRequestContext

IHttpRequestContext to handle for.

Returns

Task

A Task representing the asynchronous operation.

HandleConnectionCore(IHttpRequestContext)

Transport-specific connection handling implemented by each derived class.

protected abstract Task HandleConnectionCore(IHttpRequestContext context)

Parameters

context IHttpRequestContext

The IHttpRequestContext for this connection.

Returns

Task

A Task representing the asynchronous operation.