2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2024-10-09 05:26:51 +03:00
parent 5745887b48
commit c477a11f4b
10 changed files with 107 additions and 26 deletions

View File

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Options;
namespace Esiur.AspNetCore
{
public static class EsiurMiddlewareExtensions
{
public static IApplicationBuilder UseEsiur(this IApplicationBuilder app, EsiurOptions options)
{
ArgumentNullException.ThrowIfNull(app);
ArgumentNullException.ThrowIfNull(options);
return app.UseMiddleware<EsiurMiddleware>(Options.Create(options));
}
}
}