Interface IAsyncUseCase<TInput, TOutput>
Interface representing an asynchronous use case with input and output.
Namespace: Serenity.Global.Application.Interfaces
Assembly: Serenity.Global.Application.dll
Syntax
public interface IAsyncUseCase<in TInput, TOutput> : IUseCase
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input parameter. |
| TOutput | The type of the output result. |
Methods
ExecuteAsync(TInput, CancellationToken)
Executes the use case with the given input and returns the output.
Declaration
Task<TOutput> ExecuteAsync(TInput input, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TInput | input | The input parameter for the use case. |
| CancellationToken | cancellationToken | Optional cancellation token to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<TOutput> | The output result of the use case. |