Table of Contents

Class QueryDispatcher

Namespace
Savvyio.Queries
Assembly
Savvyio.Queries.dll

Provides a default implementation of of the IQueryDispatcher interface.

public class QueryDispatcher : RequestReplyDispatcher, IQueryDispatcher, IDispatcher
Inheritance
Object
QueryDispatcher
Implements
Inherited Members

Constructors

QueryDispatcher(IServiceLocator)

Initializes a new instance of the QueryDispatcher class.

public QueryDispatcher(IServiceLocator serviceLocator)

Parameters

serviceLocator IServiceLocator

The provider of service implementations.

Methods

Query<TResult>(IQuery<TResult>)

Queries the specified request using Request-Reply/In-Out MEP.

public TResult Query<TResult>(IQuery<TResult> request)

Parameters

request IQuery<TResult>

The IQuery<TResult> to request.

Returns

TResult

TResult.

Type Parameters

TResult

The type of the result to return.

QueryAsync<TResult>(IQuery<TResult>, Action<AsyncOptions>)

Queries the specified request asynchronous using Request-Reply/In-Out MEP.

public Task<TResult> QueryAsync<TResult>(IQuery<TResult> request, Action<AsyncOptions> setup = null)

Parameters

request IQuery<TResult>

The IQuery<TResult> to request.

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

Task<TResult>

A System.Threading.Tasks.Task<TResult> that represents the asynchronous operation. The task result contains the outcome of the query operation.

Type Parameters

TResult

The type of the result to return.

See Also