Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat: ICommandHandler & IEventHandler make use of Command/Event classes

Lars92e6f8334f3b
diff --git a/LarsWM.Core/Common/Models/ICommandHandler.cs b/LarsWM.Core/Common/Models/ICommandHandler.cs
index 27a9c3fb..12439e43 100644
--- a/LarsWM.Core/Common/Models/ICommandHandler.cs
+++ b/LarsWM.Core/Common/Models/ICommandHandler.cs
@@ -4,8 +4,8 @@ using System.Text;
namespace LarsWM.Core.Common.Models
{
- public interface ICommandHandler<in TCommand, out TResult> where TCommand : ICommand<TResult>
+ public interface ICommandHandler<TCommand> where TCommand : Command
{
- TResult Handle();
+ void Handle(TCommand command);
}
}
diff --git a/LarsWM.Core/Common/Models/IEventHandler.cs b/LarsWM.Core/Common/Models/IEventHandler.cs
index 9e9732ea..be556b99 100644
--- a/LarsWM.Core/Common/Models/IEventHandler.cs
+++ b/LarsWM.Core/Common/Models/IEventHandler.cs
@@ -4,7 +4,7 @@ using System.Text;
namespace LarsWM.Core.Common.Models
{
- public interface IEventHandler<in TEvent> where TEvent : IEvent
+ public interface IEventHandler<TEvent> where TEvent : Event
{
void Handle(TEvent @event);
}