25 lines
729 B
C#
25 lines
729 B
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.Extensions.Logging;
|
|
using System.IO;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRD.WebApi.DAL.Middleware
|
|
{
|
|
/// <summary>
|
|
/// Gets the current API resource name from HTTP context
|
|
/// </summary>
|
|
/// <param name="httpContext">The HTTP context</param>
|
|
/// <returns>The current resource name if available, otherwise an empty string</returns>
|
|
|
|
public class WebApiMiddleware
|
|
{
|
|
private readonly RequestDelegate _next;
|
|
private readonly ILogger<WebApiMiddleware> _logger;
|
|
|
|
public WebApiMiddleware(RequestDelegate next, ILogger<WebApiMiddleware> logger)
|
|
{
|
|
_next = next;
|
|
_logger = logger;
|
|
}
|
|
}
|
|
} |