// // ResponseResultResponder.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.Contracts; using Remora.Results; namespace NosSmooth.Comms.Core.Responders; /// /// Responds to by updating contractor with the response. /// public class ResponseResultResponder : IMessageResponder { private readonly Contractor _contractor; /// /// Initializes a new instance of the class. /// /// The contractor. public ResponseResultResponder(Contractor contractor) { _contractor = contractor; } /// public Task Respond(ResponseResult message, CancellationToken ct = default) => _contractor.Update(message, ct); }