From bc132bc72c59b0c99ded1cf6d2732ce169f0a6c9 Mon Sep 17 00:00:00 2001 From: Rung Date: Thu, 16 Nov 2023 19:32:24 +0700 Subject: [PATCH] Fix wrong project name --- .../IMediatorExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Codehard.Functional/Codehard.Functional.Mediatr/IMediatorExtensions.cs b/src/Codehard.Functional/Codehard.Functional.Mediatr/IMediatorExtensions.cs index 60c9cc5..af13ecb 100644 --- a/src/Codehard.Functional/Codehard.Functional.Mediatr/IMediatorExtensions.cs +++ b/src/Codehard.Functional/Codehard.Functional.Mediatr/IMediatorExtensions.cs @@ -30,4 +30,17 @@ await mediator.Send(query) .Map(x => x.ToAff())) .Flatten(); } + + public static Aff PublishAff( + this IMediator mediator, + TNotification notification) + where TNotification : INotification + { + return + Aff(async () => + { + await mediator.Publish(notification); + return unit; + }); + } } \ No newline at end of file