Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
IMentorCommandHandler<TCommand, TResult>
The IMentorCommandHandler<TCommand, TResult> interface of Novior.MentorAgent.Abstractions.Interfaces: Handles a command that returns a result: a request that…
On this page
Handles a command that returns a result: a request that changes data, written as a type of its own, whose result the model reads as an action's. Registered with MentorOptions.Actions.AddCommand<TCommand, THandler>(), as IMentorCommandHandler<TCommand>.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Interfaces. Package: Novior.MentorAgent.Abstractions.
public interface IMentorCommandHandler<TCommand, TResult>
dotnet add package Novior.MentorAgent.AbstractionsMethods
Section titled “Methods”HandleAsync
Section titled “HandleAsync”Task<TResult?> HandleAsync(TCommand command, CancellationToken cancellationToken)
Runs command. An exception fails the action, and the model reads that it failed.
Parameters
command: The command, built from the model's arguments.cancellationToken: Cancelled when the turn is.
Returns: The result the model reads.
