Table of Contents

Method Send

Namespace
Mediarion
Assembly
Mediarion.dll

Send<TResponse>(IRequest<TResponse>, CancellationToken)

Sends a request and waits for its answer.

public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)

Parameters

request IRequest<TResponse>

The request.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task<TResponse>

The response.

Type Parameters

TResponse

What the request answers with.

Send(object, CancellationToken)

Sends a request whose type is only known at run time.

public Task<object?> Send(object request, CancellationToken cancellationToken = default)

Parameters

request object

The request.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task<object>

The response, boxed. A request with nothing to give back answers with Unit.