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.
 
 

27 lines
729 B

using Microsoft.AspNetCore.Http;
namespace Znyc.Cloudcar.Admin.Commons.Helpers
{
/// <summary>
/// HttpContext帮助类
/// </summary>
public static class HttpContextHelper
{
/// <summary>
/// </summary>
private static IHttpContextAccessor httpContextAccessor;
/// <summary>
/// </summary>
public static HttpContext HttpContext => httpContextAccessor.HttpContext;
/// <summary>
/// 注入
/// </summary>
/// <param name="_httpContextAccessor"></param>
public static void Configure(IHttpContextAccessor _httpContextAccessor)
{
httpContextAccessor = _httpContextAccessor;
}
}
}