Context
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using System;
using System.Security.Claims;
namespace Starterkit.Helper
{
public class Context
{
internal static HttpContext _http = null;
public static ISession Session { get; set; } = _http.Session;
public static ClaimsPrincipal User { get; set; } = _http.User;
public static HttpRequest Request { get; set; } = _http.Request;
public static HttpResponse Response { get; set; } = _http.Response;
public static ConnectionInfo Connection { get; set; } = _http.Connection;
public static IFeatureCollection Features { get; set; } = _http.Features;
public static string TraceIdentifier { get; set; } = _http.TraceIdentifier;
public static WebSocketManager WebSockets { get; set; } = _http.WebSockets;
public static IServiceProvider RequestServices { get; set; } = _http.RequestServices;
public Context(HttpContext Http)
{
_http = Http;
}
}
}