// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IPhoebusService phoebusService, IIntermeioService intermeioService) { phoebusService.RequestPhoebus(DateTime.Now); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); //app.UseDatabaseErrorPage(); } else { //app.UseExceptionHandler("/Home/Error"); //// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); //app.UseCookiePolicy(); //app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public AnalisesController(SuporteContext context, IAnaliseService analiseService, IPhoebusService phoebusService, IIntermeioService intermeioService) { _context = context; _analiseService = analiseService; _phoebusService = phoebusService; _intermeioService = intermeioService; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IPhoebusService _phoebusService, IIntermeioService _intermeioService, IAnaliseService _analiseService, IPosService _posService, IExtratoService _extratoService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } // app.UseHttpsRedirection(); app.UseHangfireDashboard(); app.UseCors(x => x.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); app.UseAuthentication(); app.UseMvc(); #region Background Jobs HangFire BackgroundJob.Schedule(() => _phoebusService.RequestPhoebus(DateTime.Now, "00:00:00", "23:59:59"), TimeSpan.FromMinutes(60)); RecurringJob.AddOrUpdate(() => _intermeioService.GetAllBaseIntermeio(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _analiseService.ValidationAnalise(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _posService.RequestPosByIntermeio(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _extratoService.ValidationAluguel(), Cron.Daily(12, 30)); #endregion }
public AuthController(SuporteContext context, IPhoebusService phoebusService, IOptions <AppSettings> appSettings, UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager) { _phoebusService = phoebusService; _context = context; _singnInManeger = signInManager; _userManager = userManager; _appSettings = appSettings.Value; }
public PhoebusController(IPhoebusRepository context, IPhoebusService phoebusService, IMapper mapper) { _phoebusService = phoebusService; _mapper = mapper; _PhRespository = context; }
public PhoebusController(SuporteContext context, IPhoebusService phoebusService) { _phoebusService = phoebusService; _context = context; }