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 AnaliseService(IIntermeioRepository Intermeiorepository, IPhoebusRepository phoebusRepository, IAnaliseRepository analiseRepository, IIntermeioService intermeioService) { _IntRepository = Intermeiorepository; _phRepository = phoebusRepository; _analiRepository = analiseRepository; _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) { 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 IntermeiosController(SuporteContext context, IIntermeioService inter) { _interService = inter; _context = context; }
public IntermaioController(IIntermeioRepository context, IIntermeioService intermeioService, IMapper mapper) { _intService = intermeioService; _mapper = mapper; _intRepository = context; }