public InjectedController(IConfiguration cfg, WebCacheContext ctx, IMemoryCache mc, ILogger logger)
 {
     _configuration = cfg;
     _db            = ctx;
     _mc            = mc;
     _logger        = logger;
 }
Exemple #2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env,
                              WebCacheContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseMvc();
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "Shoko WebCache Api v1.0");
            });
            context.Database.EnsureCreated();
        }
Exemple #3
0
 public CrossRefController(IConfiguration cfg, WebCacheContext ctx, IMemoryCache mc, ILogger <CrossRefController> logger) : base(cfg, ctx, mc, logger)
 {
 }
 public MediaInfoController(IConfiguration cfg, WebCacheContext ctx, IMemoryCache mc, ILogger <MediaInfoController> logger) : base(cfg, ctx, mc, logger)
 {
 }