public TestController( ISteamHubConnections steamHubConnections, IMatchHubConnections matchHubConnections, IRepoServiceFactory repoServiceFactory, IJackpotMatchManager jackpotMatchManager, ICoinFlipManager coinFlipManager, IDatabaseConnectionFactory connectionFactory, IGrpcServiceFactory grpcService ) { _steamHubConnections = steamHubConnections; _repoServiceFactory = repoServiceFactory; _jackpotMatchManager = jackpotMatchManager; _coinFlipManager = coinFlipManager; _discordSercviceClient = grpcService.GetDiscordSercviceClient(); }
public async Task <Dictionary <string, object> > CheckStatusOnGrpcServices() { var dict = new Dictionary <string, object>(); var discordTimeTask = Ping(() => _grpcServiceFactory.GetDiscordSercviceClient().PingAsync()); var historyTimeTask = Ping(() => _grpcServiceFactory.GetHistorySercviceClient().PingAsync()); var chatTimeTask = Ping(() => _grpcServiceFactory.GetChatSercviceClient().PingAsync()); var steamTimeTask = Ping(() => _grpcServiceFactory.GetSteamServiceClient(new SteamInventoryCacheManager()).PingAsync()); var ticketTimeTask = Ping(() => _grpcServiceFactory.GetTicketSercviceClient().PingAsync()); await Task.WhenAll(chatTimeTask, discordTimeTask, historyTimeTask, steamTimeTask, ticketTimeTask); dict.Add("Discord", discordTimeTask.Result); dict.Add("History", historyTimeTask.Result); dict.Add("Chat", chatTimeTask.Result); dict.Add("steam", steamTimeTask.Result); dict.Add("ticket", ticketTimeTask.Result); return(dict); }
public DiscordService(IDiscordAuthService discordAuthService, IGrpcServiceFactory grpcServiceFactory, ILogServiceFactory logger) { _logger = logger.CreateLogger <DiscordService>(); AuthService = discordAuthService; _discrodClientWrapper = grpcServiceFactory.GetDiscordSercviceClient(); }
public DiscordController(IDiscordService discordService, IGrpcServiceFactory grpcServiceFactory, ILogServiceFactory factory) { _discordService = discordService; _discordSercviceClient = grpcServiceFactory.GetDiscordSercviceClient(); _logger = factory.CreateLogger <DiscordController>(); }