// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, HuntContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } dbContext.Database.Migrate(); //app.UseCors(builder=>builder.AllowAnyOrigin()); app.Use(async(context, next) => { await next(); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value) && !context.Request.Path.Value.StartsWith("/api/")) { context.Request.Path = "/index.html"; await next(); } }); //app.UseSwagger(); //app.UseSwaggerUI(c => //{ // c.SwaggerEndpoint("/swagger/v1/swagger.json", "ImageHuntApi SwaggerDoc"); //}); app.UseMvcWithDefaultRoute(); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseMvc(); app.UseSignalR(routes => { routes.MapHub <LocationHub>("/locationHub"); }); ConfigureMappings(); }
public ContextBasedTest() { var dbContextOptionsBuilder = new DbContextOptionsBuilder <HuntContext>() .UseSqlite("DataSource=:memory:") .EnableSensitiveDataLogging(); _context = new HuntContext(dbContextOptionsBuilder.Options); _context.Database.OpenConnection(); _context.Database.EnsureCreated(); _context.Database.ExecuteSqlCommand("alter table Nodes add Coordinate point null;"); }
public GameService(HuntContext context, ILogger <GameService> logger) : base(context, logger) { }
public ImageService(HuntContext context, ILogger <ImageService> logger) : base(context, logger) { }
public ActionService(HuntContext context, ILogger <ActionService> logger) : base(context, logger) { }
public AbstractService(HuntContext context, ILogger logger) { Context = context; _logger = logger; }
public TokenAuthorizationHandler(HuntContext context) { _context = context; }
public NodeService(HuntContext context, ILogger <NodeService> logger) : base(context, logger) { }
public PlayerService(HuntContext context, ILogger <PlayerService> logger) : base(context, logger) { }
public TeamService(HuntContext context, ILogger <TeamService> logger) : base(context, logger) { }
public ValuesController(IServiceContext context, IHubContext <EventingHub> hubContext, HuntContext huntContext) { this.context = context; this.hubContext = hubContext; this.huntContext = huntContext; }
public AuthService(HuntContext context, ILogger <AuthService> logger) : base(context, logger) { }