// // CommandResponder.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Comms.Data.Messages; using NosSmooth.Comms.Data.Responders; using NosSmooth.Core.Client; using Remora.Results; namespace NosSmooth.Comms.Inject.MessageResponders; /// /// A responder to . /// public class CommandResponder : IMessageResponder { private readonly INostaleClient _client; /// /// Initializes a new instance of the class. /// /// The client. public CommandResponder(INostaleClient client) { _client = client; } /// public Task Respond(CommandMessage message, CancellationToken ct = default) => _client.SendCommandAsync(message.Command, ct); }