// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } app.UseHttpsRedirection(); // Enable middleware to serve generated Swagger as a JSON endpoint. app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), // specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Redbet API V1"); }); app.UseMvc(); InMemoryBus.DIContainerAccessor = () => httpContextAccessor.HttpContext.RequestServices; }
public TemplateController(NHibernate.ISession session, ILoggerFactory loggerFactory, IHttpContextAccessor contextAccessor, IHostingEnvironment hostingEnvironment) { _logger = loggerFactory.CreateLogger <TemplateController>(); _session = session; _httpContextAccessor = contextAccessor; _hostingEnvironment = hostingEnvironment; }
public LookupController ( ISession session, ILookupApplicationService lookupApplicationService, Http.IHttpContextAccessor httpContextAccessor ) : base(httpContextAccessor, session, lookupApplicationService) { }
public ApplicationController ( IApplicationService applicationService, ISession session, Http.IHttpContextAccessor httpContextAccessor ) : base(httpContextAccessor, session, applicationService) { }
protected ControllerBase(Http.IHttpContextAccessor httpContextAccessor, ISession session, params ISessionAware[] sessionAwareDependencies) { HttpContextAccessor = httpContextAccessor; CurrentSession = session; SetSessionUser(); sessionAwareDependencies.Each(sad => sad.Enlist(session)); SetServiceProperties(sessionAwareDependencies); }
void IStartup.Configure(IApplicationBuilder app) { this.m_Application = app; Microsoft.Extensions.Logging.ILoggerFactory loggerFactory = app.ApplicationServices. GetRequiredService <Microsoft.Extensions.Logging.ILoggerFactory>(); Microsoft.AspNetCore.Hosting.IHostingEnvironment env = app.ApplicationServices. GetRequiredService <Microsoft.AspNetCore.Hosting.IHostingEnvironment>(); Microsoft.AspNetCore.Http.IHttpContextAccessor httpContext = app.ApplicationServices. GetRequiredService <Microsoft.AspNetCore.Http.IHttpContextAccessor>(); this.Configure(app, env); }
public static ISession GetCurrentSession(Web.IHttpContextAccessor context) { ISessionStorageContainer sessionStorageContainer = SessionStorageFactory.GetStorageContainer(context); ISession currentSession = sessionStorageContainer.GetCurrentSession(); if (currentSession == null) { currentSession = GetNewSession(); sessionStorageContainer.Store(currentSession); } return(currentSession); }
public FinansijeController(NHibernate.ISession session, ILoggerFactory loggerFactory, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, IStringLocalizerFactory factory) { _logger = loggerFactory.CreateLogger <PonudaController>(); _session = session; _httpContextAccessor = contextAccessor; var korisnik = _session.QueryOver <Korisnik>() .Where(x => x.KorisnickoIme == contextAccessor.HttpContext.User.Identity.Name) .SingleOrDefault <Korisnik>(); var type = typeof(Prevod); var assemblyName = new AssemblyName(type.GetTypeInfo().Assembly.FullName); _localizer = factory.Create("Prevod" + korisnik.Lang, assemblyName.Name); }
private void InitializeTokenAcquisitionObjects() { IOptions <MicrosoftIdentityOptions> microsoftIdentityOptions = _provider.GetService <IOptions <MicrosoftIdentityOptions> >(); IOptions <MsalMemoryTokenCacheOptions> tokenOptions = _provider.GetService <IOptions <MsalMemoryTokenCacheOptions> >(); IOptions <ConfidentialClientApplicationOptions> ccOptions = _provider.GetService <IOptions <ConfidentialClientApplicationOptions> >(); ILogger <TokenAcquisition> logger = _provider.GetService <ILogger <TokenAcquisition> >(); IHttpClientFactory httpClientFactory = _provider.GetService <IHttpClientFactory>(); IHttpContextAccessor httpContextAccessor = CreateMockHttpContextAccessor(); _msalTestTokenCacheProvider = new MsalTestTokenCacheProvider( _provider.GetService <IMemoryCache>(), tokenOptions); _tokenAcquisition = new TokenAcquisition( _msalTestTokenCacheProvider, httpContextAccessor, microsoftIdentityOptions, ccOptions, httpClientFactory, logger); }
public IzvestajController(NHibernate.ISession session, ILoggerFactory loggerFactory, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor) { _logger = loggerFactory.CreateLogger <IzvestajController>(); _session = session; _httpContextAccessor = contextAccessor; }
public static void Configure(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) { m_httpContextAccessor = httpContextAccessor; }
public HttpSessionContainer(Web.IHttpContextAccessor context) { this._context = context; }
public ImportCSVController(IWebHostEnvironment environment, IRepository repository, ILogger <ImportCSVController> logger, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) { _environment = environment; _repository = repository; _logger = logger; _user = httpContextAccessor.HttpContext.User.FindFirst(System.Security.Claims.ClaimTypes.Name).Value; }
/// <summary> /// 생성자 /// </summary> /// <param name="_acc"></param> public IPController(Microsoft.AspNetCore.Http.IHttpContextAccessor _acc) { HttpContextAccessor = _acc; }
internal static void Configure(IApplicationBuilder app, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) { m_httpContextAccessor = httpContextAccessor; ApplicationBuilder = app; }
public CallingMicroservices(HttpClient client, Microsoft.AspNetCore.Http.IHttpContextAccessor _httpContextAccessor, IConfiguration configuration) { this.client = client; this._httpContextAccessor = _httpContextAccessor; this._configuration = configuration; }
public static void Configure(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) { m_httpContextAccessor = httpContextAccessor; _hostingEnvironment = hostingEnvironment; }
public CustomerRepository(IUnitOfWork uow, Web.IHttpContextAccessor context) : base(uow, context) { }
protected BedrockMvcController(Http.IHttpContextAccessor httpContextAccessor, ISession session, params ISessionAware[] sessionAwareDependencies) : base(httpContextAccessor, session, sessionAwareDependencies) { }
public DeliveryOptionRepository(IUnitOfWork uow, Web.IHttpContextAccessor context) : base(uow, context) { }
public IndexModel(MTGCardData cardData, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContext) { this.cardData = cardData; this.httpContext = httpContext.HttpContext; }
public AssignmentData(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) { _httpContextAccessor = httpContextAccessor; Models.LoadModels(); Assignments.LoadAssignments(); }
public NHUnitOfWork(Web.IHttpContextAccessor context) { this._context = context; }
public ProductTitleRepository(IUnitOfWork uow, Web.IHttpContextAccessor context) : base(uow, context) { }
public Repository(IUnitOfWork uow, Web.IHttpContextAccessor context) { this._uow = uow; this._context = context; }
public BasketRepository(IUnitOfWork uow, Web.IHttpContextAccessor context) : base(uow, context) { }
public HomeController(ILogger <HomeController> logger, Microsoft.AspNetCore.Http.IHttpContextAccessor accessor) { _logger = logger; _session = accessor.HttpContext.Session; }