Interface IServerStreamCommandHandler<TCommand, TResult>
interface to be implemented by a command handler for a given command type that returns TResult stream
Namespace: FastEndpoints
Assembly: FastEndpoints.Messaging.Core.dll
Syntax
public interface IServerStreamCommandHandler<in TCommand, TResult> where TCommand : class, IServerStreamCommand<TResult> where TResult : class
Type Parameters
| Name | Description |
|---|---|
| TCommand | the type of the input command |
| TResult | the type of the result stream returned |
Methods
ExecuteAsync(TCommand, CancellationToken)
receives a command and returns a stream of TResult.
Declaration
IAsyncEnumerable<TResult> ExecuteAsync(TCommand command, CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| TCommand | command | the input command object |
| CancellationToken | ct | optional cancellation token |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<TResult> |