Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, TeleQuestContext context, IBackgroundJobClient backgroundJobs)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors(builder =>
            {
                builder.AllowAnyOrigin();
                builder.AllowAnyMethod();
                builder.AllowAnyHeader();
            });

            context.Database.Migrate();

            app.UseSwagger();

            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "TeleQuest API V2");
                c.RoutePrefix = string.Empty;
            });

            app.UseHangfireDashboard("/hangfire", new DashboardOptions
            {
                Authorization = new[] { new HangfireAuth() }
            });
            backgroundJobs.Enqueue(() => Console.WriteLine("Hello world from Hangfire!"));

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Ejemplo n.º 2
0
 public CharacterController(TeleQuestContext Context)
 {
     this._context = Context;
 }
Ejemplo n.º 3
0
 public APIDazeService(TeleQuestContext context)
 {
     _context = context;
 }
Ejemplo n.º 4
0
 public RaidController(TeleQuestContext context, APIDazeService apiServie, IBackgroundJobClient backgroundJobs)
 {
     _context        = context;
     _apiServie      = apiServie;
     _backgroundJobs = backgroundJobs;
 }
Ejemplo n.º 5
0
 public CallLogController(TeleQuestContext context)
 {
     _context = context;
 }
Ejemplo n.º 6
0
 public APIDazeRaidController(TeleQuestContext Context, APIDazeService apiServie)
 {
     this._context   = Context;
     this._apiServie = apiServie;
 }
Ejemplo n.º 7
0
 public QuestController(TeleQuestContext context)
 {
     _context = context;
 }