public MatchTurnGameEventHandler( IHubContext <IngameHub, IIngameHubClient> ingameHub, IIngameSessionService ingameService) { this.ingameHub = ingameHub; this.ingameService = ingameService; }
public IngameService( IMatchRepository matchRepository, IIdentityService identityService, IIngameSessionService ingameService) { this.matchRepository = matchRepository; this.identityService = identityService; this.ingameService = ingameService; }
public IngameHub( ILogger <IngameHub> logger, IIdentityService identityService, IIngameSessionService ingameService, IIngameService ingameUserService) { this.logger = logger; this.identityService = identityService; this.ingameService = ingameService; this.ingameUserService = ingameUserService; }
public void Configure( IApplicationBuilder app, IHostEnvironment env, // TODO: remove after testing IIngameSessionService ingameService, IMatchRepository repository) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseIdentityProviderMiddleware(); app.UseRouting(); if (!env.IsDevelopment()) { app.UseSpaStaticFiles(); } app.UseEndpoints(endpoints => { endpoints.MapHub <IngameHub>("/ingamehub"); }); app.UseSpa(spa => { spa.Options.SourcePath = "Client"; if (env.IsDevelopment()) { spa.UseAngularCliServer("start"); } }); ingameService.Start(repository.LastMatch().Result); }