public RankingService(IRankingRepository rankingRepository) { if(rankingRepository == null) throw new ArgumentNullException("rankingRepostiory"); this._rankingRepository = rankingRepository; }
public FormulaService(IDriverRepository driverRepository, ICircuitRepository circuitRepository, IRankingRepository rankingRepository, ITeamRepository teamRepository) { _driverRepository = driverRepository; _circuitRepository = circuitRepository; _rankingRepository = rankingRepository; _teamRepository = teamRepository; }
public RankingService(IRankingRepository rankingRepository, IUnitOfWork unitOfWork, INotificationHandler notifications) : base(unitOfWork, notifications) { _rankingRepository = rankingRepository; }
public GebiedController(IGebiedRepository gebiedRepository, IEvenementRepository evenementRepository , IRankingRepository rankingRepository) { _gebiedRepository = gebiedRepository; _evenementRepository = evenementRepository; _rankingRepository = rankingRepository; }
public async Task <List <PlayerRankingModel> > CreatePlayerViewModel(IRankingRepository rankingRepository, IPlayerRepository playerRepository) { IEnumerable <Player> allPlayers = await playerRepository.ListAllAsync(); List <PlayerRankingModel> playerRankingModelList = new List <PlayerRankingModel>(); foreach (Player player in allPlayers) { PlayerRankingModel playerRankingModelToAdd = new PlayerRankingModel(); try { PlayerRanking PR = await rankingRepository.GetByPlayerIdAsync(player.PlayerId); playerRankingModelToAdd.playerRanking = PR; } catch { PlayerRanking PR = new PlayerRanking { PlayerId = player.PlayerId }; playerRankingModelToAdd.playerRanking = PR; } finally { playerRankingModelToAdd.playerToRank = player; playerRankingModelList.Add(playerRankingModelToAdd); } } return(playerRankingModelList); }
public RankingService(IGameRepository gameRepository, IShotRepository shotRepository, IPlayerRepository playerRepository, IRankingRepository rankingRepository, IPlayerGameStatisticsRepository playerGameStatisticsRepository) { _gameRepository = gameRepository; _shotRepository = shotRepository; _playerRepository = playerRepository; _rankingRepository = rankingRepository; _playerGameStatisticsRepository = playerGameStatisticsRepository; }
public ManagingStudentService() { studentRepository = new StudentRepository(); rankingRepository = new RankingRepository(); learningModeRepository = new LearningModeRepository(); majorRepository = new MajorRepository(); ethnicRepository = new EthnicRepository(); }
public async Task <List <PlayerRankingModel> > CreatePlayerViewModel(IRankingRepository rankingRepository, IPlayerRepository playerRepository, int profileID) { int defaultProfileID = 2025; IEnumerable <Player> allPlayers = await playerRepository.ListAllAsync(); IEnumerable <PlayerRanking> allRanksofProfile = await rankingRepository.GetAllRanksByProfileId(profileID); List <PlayerRankingModel> playerRankingModelList = new List <PlayerRankingModel>(); foreach (Player player in allPlayers) { PlayerRankingModel playerRankingModelToAdd = new PlayerRankingModel(); PlayerRanking PR = allRanksofProfile.FirstOrDefault(x => x.PlayerId == player.PlayerId); playerRankingModelToAdd.playerRanking = PR; playerRankingModelToAdd.playerToRank = player; playerRankingModelToAdd.playerRanking.TestUserProfileId = profileID; playerRankingModelList.Add(playerRankingModelToAdd); } if (playerRankingModelList.Count > 0) { return(playerRankingModelList); } else { foreach (Player player in allPlayers) { PlayerRankingModel playerRankingModelToAdd = new PlayerRankingModel(); try { PlayerRanking PR = await rankingRepository.GetByPlayerIdAsync(player.PlayerId); if (PR.TestUserProfileId == defaultProfileID) { PR.TestUserProfileId = profileID; playerRankingModelToAdd.playerRanking = PR; await _rankingRepository.AddAsync(PR); } } catch { PlayerRanking PR = new PlayerRanking { PlayerId = player.PlayerId }; playerRankingModelToAdd.playerRanking = PR; } finally { playerRankingModelToAdd.playerToRank = player; playerRankingModelList.Add(playerRankingModelToAdd); } } return(playerRankingModelList); } }
public RankingService(IRankingRepository rankingRepository) { if (rankingRepository == null) { throw new ArgumentNullException("rankingRepostiory"); } this._rankingRepository = rankingRepository; }
public BetStrategyService(IGameRepository gameRepository, IBetRepository betRepository, IStrategyRepository strategyRepository, IStrategyFactory strategyFactory,IRankingRepository rankingRepository, IScorer scorer) { this._gameRepository = gameRepository; this._betRepository = betRepository; this._strategyRepository = strategyRepository; this._strategyFactory = strategyFactory; this._rankingRepository = rankingRepository; this._scorer = scorer; }
public BetStrategyService(IGameRepository gameRepository, IBetRepository betRepository, IStrategyRepository strategyRepository, IStrategyFactory strategyFactory, IRankingRepository rankingRepository, IScorer scorer) { this._gameRepository = gameRepository; this._betRepository = betRepository; this._strategyRepository = strategyRepository; this._strategyFactory = strategyFactory; this._rankingRepository = rankingRepository; this._scorer = scorer; }
public GameService(IGameRepository gameRepository, IBetRepository betRepository, IRankingRepository rankingRepository, IScorer scorer) { if (gameRepository == null) throw new ArgumentNullException("gameRepository"); if (betRepository == null) throw new ArgumentNullException("betRepository"); if (scorer == null) throw new ArgumentNullException("scorer"); this._gameRepository = gameRepository; this._betRepository = betRepository; this._rankingRepository = rankingRepository; this._scorer = scorer; }
public static async Task AddPlayerRanking(Player returnedPlayer, IRankingRepository rankingRepository, IPlayerRepository playerRepository) { if (await rankingRepository.GetByPlayerIdAsync(returnedPlayer.PlayerId) != null) { PlayerRanking playerRankingToDelete = await rankingRepository.GetByPlayerIdAsync(returnedPlayer.PlayerId); await rankingRepository.DeleteAsync(playerRankingToDelete); Console.Write("Previous Ranking Deleted"); } PlayerRanking playerRankingToAdd = new PlayerRanking(); playerRankingToAdd.PlayerId = returnedPlayer.PlayerId; IEnumerable <PlayerRanking> allPlayerRanks = await rankingRepository.ListAllAsync(); IEnumerable <Player> allPlayers = await playerRepository.ListAllAsync(); if (allPlayerRanks.Count() > 0) { var highestRankedPlayer = allPlayerRanks.Max(x => x.PlayerRank); var highestPprPlayer = allPlayerRanks.Max(x => x.PprRank); var highestDynastyPlayer = allPlayerRanks.Max(x => x.DynastyRank); playerRankingToAdd.PlayerRank = highestRankedPlayer + 1; playerRankingToAdd.PprRank = highestPprPlayer + 1; playerRankingToAdd.DynastyRank = highestDynastyPlayer + 1; CalculatePlayerRanking(returnedPlayer, allPlayerRanks, allPlayers, playerRankingToAdd); } else { playerRankingToAdd.PlayerRank = 1; playerRankingToAdd.PosRank = 1; playerRankingToAdd.PprRank = 1; playerRankingToAdd.PprPosRank = 1; playerRankingToAdd.DynastyRank = 1; playerRankingToAdd.DynastyPosRank = 1; } playerRankingToAdd.TestUserProfileId = 2025; playerRankingToAdd.isDefault = true; await rankingRepository.AddAsync(playerRankingToAdd); }
public GameService(IGameRepository gameRepository, IBetRepository betRepository, IRankingRepository rankingRepository, IScorer scorer) { if (gameRepository == null) { throw new ArgumentNullException("gameRepository"); } if (betRepository == null) { throw new ArgumentNullException("betRepository"); } if (scorer == null) { throw new ArgumentNullException("scorer"); } this._gameRepository = gameRepository; this._betRepository = betRepository; this._rankingRepository = rankingRepository; this._scorer = scorer; }
public RankingService(IRankingRepository rankingRepository, ITeamRepository teamRepository, ITournamentRepository tournamentRepository, ITeamStatRepository teamStatRepository, ITeamStatWorldCupRepository teamStatWorldCupRepository, IH2HRepository h2hRepository, IH2HWorldCupRepository h2hWorldCupRepository, IMatchRepository matchRepository, IGoalscorerRepository goalscorerRepository, IPlayerRepository playerRepository) { this._rankingRepository = rankingRepository; this._teamRepository = teamRepository; this._tournamentRepository = tournamentRepository; this._teamStatRepository = teamStatRepository; this._teamStatWorldCupRepository = teamStatWorldCupRepository; this._h2hRepository = h2hRepository; this._h2hWorldCupRepository = h2hWorldCupRepository; this._matchRepository = matchRepository; this._goalscorerRepository = goalscorerRepository; this._playerRepository = playerRepository; }
public RankingController(IRankingRepository rankingRepository, IGebiedRepository gebiedRepository) { _rankingRepository = rankingRepository; _gebiedRepository = gebiedRepository; }
public RankingService(IRankingRepository repository) { this.repository = repository; }
public RankingObjConcluidosController() { _rankingObjConcluidosRepository = new RankingRepository(); }
public RankingGateway(IRankingRepository repository) { _repository = repository; }
public RankingService(IRankingRepository rankingRepository) { _rankingRepository = rankingRepository; }
public RankingService(IRankingRepository rankingRepository) : base(rankingRepository) { this.rankingRepository = rankingRepository; }
public async Task <List <PlayerRanking> > CreateListOfPlayerRanksByProfileId(int id, IPlayerRepository _playerRepository, IRankingRepository _rankingRepository) { IEnumerable <Player> allPlayers = new List <Player>(); allPlayers = await _playerRepository.ListAllAsync(); List <PlayerRanking> rankingsToReturn = new List <PlayerRanking>(); foreach (Player player in allPlayers) { var playerRankingCreated = await GetByPlayerIdAndProfileIdAsync(player.PlayerId, 2025); PlayerRanking playerRankingToAdd = new PlayerRanking(); playerRankingToAdd.DynastyPosRank = playerRankingCreated.DynastyPosRank; playerRankingToAdd.DynastyRank = playerRankingCreated.DynastyRank; playerRankingToAdd.isDefault = false; playerRankingToAdd.Player = playerRankingCreated.Player; playerRankingToAdd.PlayerId = playerRankingCreated.PlayerId; playerRankingToAdd.PlayerRank = playerRankingCreated.PlayerRank; playerRankingToAdd.PosRank = playerRankingCreated.PosRank; playerRankingToAdd.PprPosRank = playerRankingCreated.PprPosRank; playerRankingToAdd.PprRank = playerRankingCreated.PprRank; playerRankingToAdd.TestUserProfileId = id; //rankingsToReturn.Add(playerRankingCreated); await _rankingRepository.AddAsync(playerRankingToAdd); } return(rankingsToReturn); }
public PlayerRankingController(IPlayerRepository playerRepository, IRankingRepository rankingRepository) { _playerRepository = playerRepository; _rankingRepository = rankingRepository; _createPlayerViewModels = new CreatePlayerViewModels(_rankingRepository); }
public PlayerController(IPlayerRepository playerRepository, IRankingRepository rankingRepository) { _playerRepository = playerRepository; _rankingRepository = rankingRepository; }
public RankingObjOcultosController() { _rankingObjOcultosRepository = new RankingRepository(); }
public RankingService() { _rankingRepository = DatabaseFactory.GetRankingRepository(); }
public rankingController() { _rankingRepository = new RankingRepository(); }
public ProfileUserController(IProfileRepository profileRepository, IPlayerRepository playerRepository, IRankingRepository rankingRepository) { _profileRepository = profileRepository; _playerRepository = playerRepository; _rankingRepository = rankingRepository; }
public CreatePlayerViewModels(IRankingRepository rankingRepository) { _rankingRepository = rankingRepository; }
public RankingNotasController() { _rankingCurtidaRepository = new RankingRepository(); }
public RankingController(IRankingRepository repository, IVideoPostRepository vpRepository) { _repository = repository; _vpRepository = vpRepository; }
public RankingService(IGameRepository gameRepository, IRankingRepository rankingRepository, IUnitOfWork unitOfWork) { _gameRepository = gameRepository; _rankingRepository = rankingRepository; _unitOfWork = unitOfWork; }
public RankingController(IRepository <Lancamentos> respository, IRankingRepository rankingRepository) { _repository = respository; _rankingRepository = rankingRepository; }