招聘后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
678 B

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