using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Znyc.Recruitment.Admin.Commons.Helpers;
namespace Znyc.Recruitment.Admin.Commons.Extensions
{
///
/// HttpContext 扩展
///
public static class HttpContextExtentions
{
public static IApplicationBuilder UseStaticHttpContextAccessor(this IApplicationBuilder app)
{
IHttpContextAccessor httpContextAccessor = app.ApplicationServices.GetRequiredService();
HttpContextHelper.Configure(httpContextAccessor);
return app;
}
}
}