Table of Contents

TryInvokeAsync Method

Definition

Namespace
Savvyio.Handlers
Assemblies
Savvyio.Core.dll
Source
src/Savvyio.Core/Handlers/IRequestReplyActivator.cs

TryInvokeAsync<TResponse>(TRequest, CancellationToken)

Invokes (if registered) the function delegate handling the specified request.

Task<ConditionalValue<TResponse>> TryInvokeAsync<TResponse>(TRequest request, CancellationToken ct = default)

Parameters

request TRequest

The model that is handled by a function delegate.

ct CancellationToken

The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ConditionalValue<TResponse>>

A task that represents the asynchronous operation. The task result contains a ConditionalValue that indicates if a function delegate matching the specified request was invoked and with the potential result hereof.

Type Parameters

TResponse

The type of the response.