Adds Decorator, wip

This commit is contained in:
Janus C. H. Knudsen 2025-03-11 00:28:06 +01:00
parent a86a2d7ade
commit 49f9b99ee1
9 changed files with 112 additions and 45 deletions

View file

@ -5,9 +5,9 @@ namespace PlanTempus.Components;
public class CommandHandler(IComponentContext context) : ICommandHandler
{
public Task<TCommandResult> Handle<TCommand, TCommandResult>(TCommand command)
public async Task<TCommandResult> Handle<TCommand, TCommandResult>(TCommand command)
{
var handler = context.Resolve<ICommandHandler<TCommand, TCommandResult>>();
return handler.Handle(command);
return await handler.Handle(command);
}
}