Пример #1
0
 public BaseController(IServiceProvider serviceProvider)
 {
     this._httpContextAccessor = serviceProvider.GetRequiredService <IHttpContextAccessor>();
     this._appContextHandler   = serviceProvider.GetRequiredService <IAppContextHandler>();
     //this._stringLocalizer = serviceProvider.GetRequiredService<IStringLocalizer<miResources>>();
     _configuration = serviceProvider.GetRequiredService <IConfiguration>();
 }
Пример #2
0
 public CustomAuthorizationHandler(IHttpContextAccessor httpContextAccessor, IAppContextHandler appContextHandler, IConfiguration configuration)
 {
     _httpContextAccessor = httpContextAccessor;
     _appContextHandler   = appContextHandler;
     _configuration       = configuration;
 }