Class ObservableQueryHttp

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

Provides shared HTTP handling for observable queries.

public static class ObservableQueryHttp
Inheritance
ObservableQueryHttp
Inherited Members

Fields

DefaultWaitForFirstResultTimeout

The default timeout used when waiting for the first observable query result.

public static readonly TimeSpan DefaultWaitForFirstResultTimeout

Field Value

TimeSpan

WaitForFirstResultQueryStringKey

The query string key used to wait for the first result before returning the HTTP response.

public const string WaitForFirstResultQueryStringKey = "waitForFirstResult"

Field Value

string

WaitForFirstResultTimeoutQueryStringKey

The query string key used to override the wait-for-first-result timeout in seconds.

public const string WaitForFirstResultTimeoutQueryStringKey = "waitForFirstResultTimeout"

Field Value

string

Methods

CreateResponse(QueryContext, object, ObservableQueryHttpOptions, CancellationToken)

Creates the HTTP response for an observable query result.

public static Task<ObservableQueryHttpResponse> CreateResponse(QueryContext queryContext, object streamingData, ObservableQueryHttpOptions options, CancellationToken cancellationToken)

Parameters

queryContext QueryContext

The QueryContext for the current request.

streamingData object

The observable query result.

options ObservableQueryHttpOptions

The ObservableQueryHttpOptions.

cancellationToken CancellationToken

The CancellationToken for the request.

Returns

Task<ObservableQueryHttpResponse>

The ObservableQueryHttpResponse to send.

GetOptions(IReadOnlyDictionary<string, string>)

Gets the observable query HTTP options from the provided query string values.

public static ObservableQueryHttpOptions GetOptions(IReadOnlyDictionary<string, string> query)

Parameters

query IReadOnlyDictionary<string, string>

The query string values.

Returns

ObservableQueryHttpOptions

The parsed ObservableQueryHttpOptions.