From 50b92115bb67667a1eebf8a9bf5943e32bc0d122 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 4 Nov 2026 15:28:51 +0100 Subject: [PATCH] Refactor SendAsync method in MessagingServiceClient The `SendAsync` method in the `MessagingServiceClient` class has been refactored. It no longer uses the `async` keyword and instead directly returns the `Task` from `sender.Send`. This change simplifies the method by removing the `await` operation, while still maintaining asynchronous behavior through the returned `Task`. --- .../MessagingServiceClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presentation/DigitalData.MessagingService.Client/MessagingServiceClient.cs b/src/presentation/DigitalData.MessagingService.Client/MessagingServiceClient.cs index 82c634b..86fd481 100644 --- a/src/presentation/DigitalData.MessagingService.Client/MessagingServiceClient.cs +++ b/src/presentation/DigitalData.MessagingService.Client/MessagingServiceClient.cs @@ -16,9 +16,9 @@ public class MessagingServiceClient(ISender sender) /// /// /// - public async Task SendAsync(Email email, CancellationToken cancellationToken = default) + public Task SendAsync(Email email, CancellationToken cancellationToken = default) { - await sender.Send(new PublishEmailViaSmtpCommand() + return sender.Send(new PublishEmailViaSmtpCommand() { Sender = new GetEmailAccountQuery() {