TryInvokeAsync Method
Definition
- Assemblies
- Savvyio.Core.dll
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
requestTRequestThe model that is handled by a function delegate.
ctCancellationTokenThe 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
requestwas invoked and with the potential result hereof.
Type Parameters
TResponseThe type of the response.