Table of Contents

Interface IHandler<TRequest>

Namespace
Olve.MinimalApi
Assembly
Olve.MinimalApi.dll

Defines a handler for processing requests of type TRequest.

public interface IHandler<in TRequest>

Type Parameters

TRequest

The type of request to handle.

Methods

RunAsync(TRequest, CancellationToken)

Runs the handler asynchronously for the specified request.

Task<Result> RunAsync(TRequest request, CancellationToken cancellationToken)

Parameters

request TRequest

The request to handle.

cancellationToken CancellationToken

Token to cancel operation.

Returns

Task<Result>

A Result indicating success or failure.