Example #1
0
        // 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 EfetuarQuebraPontosExtratoCommandHandler(IExtratoService extratoService)
 {
     this.extratoService = extratoService;
 }
Example #3
0
 public ExtratoController(IExtratoService extratoService)
 {
     this.extratoService = extratoService;
 }
 public AtualizarSaldoExtratoCommandHandler(IExtratoService extratoService, IIntegrationBus eventBus)
 {
     this.extratoService = extratoService;
     this.eventBus       = eventBus;
 }
 public RemoverPontosExtratoCommandHandler(IExtratoService extratoService)
 {
     this.extratoService = extratoService;
 }
Example #6
0
 public CriarExtratoExtratoCommandHandler(IExtratoService extratoService)
 {
     this.extratoService = extratoService;
 }
Example #7
0
 public ExtratoController(IExtratoRepository extratoRepository, IExtratoService extratoService)
 {
     _extratoRepository = extratoRepository;
     _extratoService    = extratoService;
 }
 public AdicionarPontosExtratoCommandHandler(
     IExtratoService extratoService)
 {
     this.extratoService = extratoService;
 }