public ParticipantCleanupHostedService(ILogger <ParticipantCleanupHostedService> logger, ILeaderboardService leaderboardService, BotDbContext dbContext, AppOptions options) : base(JobCronExpression, TimeZoneInfo.Utc) { _logger = logger; _leaderboardService = leaderboardService; _dbContext = dbContext; }
public ApplicationServiceGameResult(IGameResultService gameResultService , IMapper mapper, ILeaderboardService leaderboardService) { this.gameResultService = gameResultService; this.mapper = mapper; this.leaderboardService = leaderboardService; }
/// <inheritdoc cref="LeaderboardController"/> public LeaderboardController( ILeaderboardService leaderboardService, IDistributedCache distributedCache, IOptions <CacheConfiguration> options) : base(distributedCache, "leaderboard-stats:{0}", options) { _leaderboardService = leaderboardService; }
/// <summary> /// Initializes a new instance of the <see cref="AccountController"/> class. /// </summary> public AccountController(IAccountService accountService, ILeaderboardService leaderboardService, IMapperService mapperService, IHttpContextAccessor httpContextAccessor) { _accountService = accountService; _leaderboardService = leaderboardService; _mapperService = mapperService; _httpContextAccessor = httpContextAccessor; }
public WheelOfFortuneGame(ulong userId, long bet, ICurrencyService cs, ILeaderboardService lb) { _rng = new NadekoRandom(); _cs = cs; _bet = bet; _userId = userId; _lb = lb; }
public LeaderboardsController(ILeaderboardService leaderboardService, IQuizService quizService, IStudentActivityService studentActivityService) { this._leaderboardService = leaderboardService; this._quizService = quizService; this._studentActivityService = studentActivityService; }
public UserService(ILeaderboardService leaderboard, IQuestService quest, IPersistanceStorage storage) { _leaderboard = leaderboard; _quest = quest; _storage = storage; Load(); }
public LeaderboardModule(ILogger <LeaderboardModule> logger, IStravaAuthenticationService stravaAuthenticationService, ILeaderboardService leaderboardService) { _logger = logger; _stravaAuthenticationService = stravaAuthenticationService; _leaderboardService = leaderboardService; }
public WeeklyLeaderboardHostedService(ILogger <WeeklyLeaderboardHostedService> logger, DiscordSocketClient discordClient, BotDbContext dbContext, ILeaderboardService leaderboardService) : base(JobCronExpression, TimeZoneInfo.Utc) { _logger = logger; _discordSocketClient = discordClient; _dbContext = dbContext; _leaderboardService = leaderboardService; }
public void ThrowArgumentNullException_WhenILeaderboardDamageServiceParameterIsNull() { // Arrange ILeaderboardService leaderboardService = null; // Act & Assert Assert.That( () => new LeaderboardController(leaderboardService), Throws.InstanceOf <ArgumentNullException>().With.Message.Contains(nameof(ILeaderboardService))); }
public ExportController(ILeaderboardService leaderboardService, IImportExportService importExportService) { _leaderboardService = leaderboardService; _importExportService = importExportService; _path = Path.Combine(Path.GetTempPath(), "ExportedExcelFiles"); if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } }
public AdminModule( ILogger <AdminModule> logger, ILeaderboardParticipantService participantService, ILeaderboardService leaderboardResultService, IRoleService roleService) { _logger = logger; _participantService = participantService; _leaderboardService = leaderboardResultService; _roleService = roleService; }
public MatchController(IMatchRepository matchRepository, IMatchupResultRepository matchupResultRepository, ILeaderboardService leaderboardService, ILeaderboardViewRepository leaderboardViewRepository, ILogger logger) { _matchRepository = matchRepository; _matchupResultRepository = matchupResultRepository; _leaderboardService = leaderboardService; _leaderboardViewRepository = leaderboardViewRepository; _logger = logger; }
public Game(IRenderer renderer, ILeaderboardService leaderboardService) { Quit = false; Renderer = renderer; Logger = new Logger(@"C:\Temp\NPPGamesGameLog.txt"); UpdateRateInMilliseconds = 5; GameSize = new Size() { Height = 40, Width = 128 }; CreateGameData(leaderboardService); }
public MatchController(IMatchRepository matchRepository, IMatchupResultRepository matchupResultRepository, ILeaderboardService leaderboardService, ILeaderboardViewRepository leaderboardViewRepository, IUserRepository userRepository, ISeasonLogic seasonLogic) { _matchRepository = matchRepository; _matchupResultRepository = matchupResultRepository; _leaderboardService = leaderboardService; _leaderboardViewRepository = leaderboardViewRepository; _userRepository = userRepository; _seasonLogic = seasonLogic; }
public PublicModule(ILogger <PublicModule> logger, CommandService commandService, ILeaderboardParticipantService participantService, IEmbedBuilderService embedBuilderService, IStravaAuthenticationService stravaAuthenticationService, IActivitiesService activityService, ILeaderboardService leaderboardService) { _logger = logger; _commandService = commandService; _participantService = participantService; _embedBuilderService = embedBuilderService; _stravaAuthenticationService = stravaAuthenticationService; _activityService = activityService; _leaderboardService = leaderboardService; }
public MatchController(IMatchRepository matchRepository, IMatchupResultRepository matchupResultRepository, ILeaderboardService leaderboardService, ILeaderboardViewRepository leaderboardViewRepository, ISeasonLogic seasonLogic, IHubContext <MessageHub, ITypedHubClient> hubContext, IPlayerRankHistoryRepository playerRankHistoryRepository) { _matchRepository = matchRepository; _matchupResultRepository = matchupResultRepository; _leaderboardService = leaderboardService; _leaderboardViewRepository = leaderboardViewRepository; _seasonLogic = seasonLogic; _hubContext = hubContext; _playerRankHistoryRepository = playerRankHistoryRepository; }
public WeeklyLeaderboardHostedService(ILogger <WeeklyLeaderboardHostedService> logger, DiscordSocketClient discordClient, IStravaService stravaService, IEmbedBuilderService embedBuilderService, ILeaderboardService leaderboardService, ILeaderboardParticipantService participantService, ILeaderboardResultService leaderboardResultService, IRoleService roleService) : base(JOB_CRON_EXPRESSION, TimeZoneInfo.Utc) { _logger = logger; _discordSocketClient = discordClient; _stravaService = stravaService; _embedBuilderService = embedBuilderService; _leaderboardService = leaderboardService; _participantService = participantService; _leaderboardResultService = leaderboardResultService; _roleService = roleService; }
public Session(ILeaderboardService leaderboardService, string gameId) { // also noted int MachineInfo - this might be the most difficult thing to port. See MachineInfo for details SessionBeginTime = DateTime.Now; LeaderboardService = leaderboardService; UserId = MachineInfo.GetMacAddress(); var leaderboard = leaderboardService.GetLeaderboardByGameId(gameId); Player = leaderboard.GetPlayerByUniqueId(UserId); if (null == Player) { Player = new LeaderboardPlayer() { UniqueId = UserId } } ; leaderboard.AddPlayer(Player); }
public async Task E_Possivel_Executar_Metodo_GET() { // Arrange _serviceMoq = new Mock <ILeaderboardService>(); _serviceMoq.Setup(a => a.GetTop100()).ReturnsAsync(new List <LeaderboardViewModel>() { new LeaderboardViewModel() { PlayerId = 2, Balance = 10 }, new LeaderboardViewModel() { PlayerId = 3, Balance = 8 }, }); _service = _serviceMoq.Object; // Act var result = await _service.GetTop100(); // Assert Assert.NotNull(result); Assert.Collection(result, item => { Assert.Equal(10, item.Balance); Assert.Equal(2, item.PlayerId); }, item => { Assert.Equal(8, item.Balance); Assert.Equal(3, item.PlayerId); }); }
public LeaderboardUpdateService(ILogger <LeaderboardUpdateService> logger, IGitHubClient gitHubClient, ILeaderboardService leaderboardService) { _logger = logger; _leaderboardService = leaderboardService; _timer = new Timer(SyncPRs, null, Timeout.Infinite, 0); }
public LeaderboardController(ILeaderboardService leaderboardService, ILogger logger) { _leaderboardService = leaderboardService; _logger = logger; }
public LeaderboardController(ILeaderboardService leaderboardService) { Guard.WhenArgument(leaderboardService, nameof(ILeaderboardService)).IsNull().Throw(); this.leaderboardService = leaderboardService; }
public LeaderboardController(ILeaderboardService leaderboardService, ISeasonLogic seasonLogic) { _leaderboardService = leaderboardService; _seasonLogic = seasonLogic; }
public LeaderboardController(ILeaderboardService leaderboard) { _leaderboard = leaderboard ?? throw new ArgumentNullException(nameof(leaderboard)); }
public WheelOfFortuneCommands(ICurrencyService cs, ILeaderboardService lb, DbService db) { _cs = cs; _db = db; _lb = lb; }
public ContestService(IContestRepository contestRepo, ILeaderboardService leaderboardService, ICompetitorRepository competitorRepository) { _contestRepo = contestRepo; _leaderboardService = leaderboardService; _competitorRepository = competitorRepository; }
public GamesController(IPubstarsDb db, UserManager <ApplicationUser> userManager, ILeaderboardService ls) { _db = db; _userManager = userManager; _leaderboards = ls; }
public LeaderboardController(ILogger <LeaderboardController> logger, ILeaderboardService leaderboardService) { _logger = logger; _leaderboardService = leaderboardService; }
public LeaderboardController(ILeaderboardService leaderboardService) { this.leaderboardService = leaderboardService; }