// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { 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", "My API V1"); c.RoutePrefix = string.Empty; }); app.UseCors("Todos"); app.UseMvc(); loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "OxiServi API"); }); app.UseHangfireServer(); app.UseHangfireDashboard(); var job = new JobModule(); job.Job(_configuration["API:connectionString"]); }
public void InsertJob(int index, JobModule job) { JobModules.Insert(index, job); JobModule previous = JobModules[index - 1]; JobModule next = JobModules[index + 1]; job.CalculateRoute(previous.Reciever.Address); next.CalculateRoute(job.Reciever.Address); AdjustTime(index); //raise event }
public void RemoveJob(JobModule job) { int index = JobModules.IndexOf(job); //TODO håndter index = 0 / = count JobModule previous = JobModules[index - 1]; JobModule next = JobModules[index + 1]; next.CalculateRoute(previous.Reciever.Address); JobModules.Remove(job); AdjustTime(index); //raise event }
public void AddJob(JobModule job) { if (JobModules.Count != 0) { JobModule previousJob = JobModules[JobModules.Count]; job.CalculateRoute(previousJob.Reciever.Address); // Todo: gør noget når det er den samme adresse job.Route.StartTime = previousJob.EndTime; job.StartTime = job.Route.EndTime; } else { job.CalculateRoute(EmployeeGroup.GroupAddress); // TODO, GroupAddress skal implementeres i Group klassen job.Route.StartTime = StartTime; job.StartTime = job.Route.EndTime; } JobModules.Add(job); // raise event }