コード例 #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();
            });
        }
コード例 #2
0
 public CharacterController(TeleQuestContext Context)
 {
     this._context = Context;
 }
コード例 #3
0
ファイル: APIDazeService.cs プロジェクト: cluzier/Tele-Quest
 public APIDazeService(TeleQuestContext context)
 {
     _context = context;
 }
コード例 #4
0
ファイル: RaidController.cs プロジェクト: cluzier/Tele-Quest
 public RaidController(TeleQuestContext context, APIDazeService apiServie, IBackgroundJobClient backgroundJobs)
 {
     _context        = context;
     _apiServie      = apiServie;
     _backgroundJobs = backgroundJobs;
 }
コード例 #5
0
 public CallLogController(TeleQuestContext context)
 {
     _context = context;
 }
コード例 #6
0
 public APIDazeRaidController(TeleQuestContext Context, APIDazeService apiServie)
 {
     this._context   = Context;
     this._apiServie = apiServie;
 }
コード例 #7
0
ファイル: QuestController.cs プロジェクト: cluzier/Tele-Quest
 public QuestController(TeleQuestContext context)
 {
     _context = context;
 }