From 1972b8d6c92d7cfbcc8896393c79be9883f1b822 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 9 Jul 2025 09:48:18 +0200 Subject: [PATCH] Add synchronous version of UpdateArticleAsync with XML documentation --- .../Articles/PutExtensions.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs b/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs index 4075936..48a80e6 100644 --- a/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs +++ b/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs @@ -15,9 +15,19 @@ public static class PutExtensions /// The entity to be updated. /// Optional API version to include in the request. /// A representing the asynchronous operation. - public static Task UpdateArticleAsync(this IMediator mediator, Article article, int? apiVersion = null) => - mediator.Send(new PutRequest(article) - { - ApiVersion = apiVersion - }); + public static Task UpdateArticleAsync(this IMediator mediator, Article article, int? apiVersion = null) => mediator.Send(new PutRequest(article) + { + ApiVersion = apiVersion + }); + + /// + /// Sends a request to update an existing using MediatR. + /// + /// The instance used to send the request. + /// The entity to be updated. + /// Optional API version to include in the request. + public static void UpdateArticle(this IMediator mediator, Article article, int? apiVersion = null) => mediator.Send(new PutRequest(article) + { + ApiVersion = apiVersion + }).GetAwaiter().GetResult(); }