Interface IActivityTask<TInput, TOutput>
- Namespace
- Songhay.Abstractions
- Assembly
- SonghayCore.dll
public interface IActivityTask<in TInput, TOutput> where TOutput : notnull
Type Parameters
TInputThe type of the input.
TOutputThe non-nullable type of the output.
- Extension Methods
Remarks
For detail aound why this definition exists, see https://github.com/BryanWilhite/SonghayCore/issues/83
Methods
StartAsync(TInput?, CancellationToken)
Starts the IActivity asynchronously.
Task<TOutput> StartAsync(TInput? input, CancellationToken cancellationToken)
Parameters
inputTInputThe input.
cancellationTokenCancellationTokenThe CancellationToken.
Returns
- Task<TOutput>
Remarks
Note that TOutput is not marked as nullable
with the expectation that *Result classes/records
like EndpointResult will be used.