M Core/NosSmooth.Game/Contracts/ContractEventResponder.cs => Core/NosSmooth.Game/Contracts/ContractEventResponder.cs +2 -0
@@ 5,6 5,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using NosSmooth.Core.Contracts;
+using NosSmooth.Game.Events;
using NosSmooth.Game.Events.Core;
using Remora.Results;
@@ 29,5 30,6 @@ public class ContractEventResponder : IEveryGameResponder
/// <inheritdoc />
public Task<Result> Respond<TEvent>(TEvent gameEvent, CancellationToken ct = default)
+ where TEvent : IGameEvent
=> _contractor.Update(gameEvent, ct);
}=
\ No newline at end of file
M Core/NosSmooth.Game/Events/Core/IGameResponder.cs => Core/NosSmooth.Game/Events/Core/IGameResponder.cs +2 -1
@@ 45,5 45,6 @@ public interface IEveryGameResponder
/// <param name="ct">The cancellation token for cancelling the operation.</param>
/// <typeparam name="TEvent">The current event type.</typeparam>
/// <returns>A result that may or may not have succeeded.</returns>
- public Task<Result> Respond<TEvent>(TEvent gameEvent, CancellationToken ct = default);
+ public Task<Result> Respond<TEvent>(TEvent gameEvent, CancellationToken ct = default)
+ where TEvent : IGameEvent;
}=
\ No newline at end of file