Add synchronous version of CreateArticleAsync with XML documentation

This commit is contained in:
tekh 2025-07-09 09:46:02 +02:00
parent 71f7039376
commit 821edc8718

View File

@ -19,4 +19,15 @@ public static class PostExtensions
{
ApiVersion = apiVersion
});
/// <summary>
/// Sends a request to create a new <see cref="Article"/> using MediatR.
/// </summary>
/// <param name="mediator">The <see cref="IMediator"/> instance used to send the request.</param>
/// <param name="article">The <see cref="Article"/> entity to be created.</param>
/// <param name="apiVersion">Optional API version to include in the request.</param>
public static void CreateArticle(this IMediator mediator, Article article, int? apiVersion = null) => mediator.Send(new PostRequest(article)
{
ApiVersion = apiVersion
}).GetAwaiter().GetResult();
}