// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, SwiperContext context, IOptions <HostConfig> hostConfig, IOptions <StorageConfig> storageConfig, IOptions <MigrationConfig> migrationConfig, SwiperMigrator migrator) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(new StaticFileOptions() { FileProvider = new PhysicalFileProvider( storageConfig.Value.ImageFolder), RequestPath = new PathString(hostConfig.Value.ImageHostFolder) }); app.UseAuthentication(); app.UseMvc(); if (migrationConfig.Value.Migrate) { // Create DB on startup and do the migrations. Manual migrations are NOT needed anymore context.Database.Migrate(); migrator.Migrate(); } }
public MigrateService(SwiperContext swiperContext) { context = swiperContext; }
public UserService(SwiperContext swiperContext) { context = swiperContext; }
public ImageService(SwiperContext swiperContext, IOptions <HostConfig> hostConfig) { context = swiperContext; this.hostConfig = hostConfig; }
public ProjectService(SwiperContext swiperContext) { context = swiperContext; }
public ChallengeService(SwiperContext swiperContext, IImageService imageService) { context = swiperContext; imgService = imageService; }
public AnnotationService(SwiperContext swiperContext) { context = swiperContext; }