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
WaitForFirstResultQueryStringKey
The query string key used to wait for the first result before returning the HTTP response.
public const string WaitForFirstResultQueryStringKey = "waitForFirstResult"
Field Value
WaitForFirstResultTimeoutQueryStringKey
The query string key used to override the wait-for-first-result timeout in seconds.
public const string WaitForFirstResultTimeoutQueryStringKey = "waitForFirstResultTimeout"
Field Value
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
queryContextQueryContextThe QueryContext for the current request.
streamingDataobjectThe observable query result.
optionsObservableQueryHttpOptionscancellationTokenCancellationTokenThe 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
queryIReadOnlyDictionary<string, string>The query string values.
Returns
- ObservableQueryHttpOptions
The parsed ObservableQueryHttpOptions.