Example #1
0
 public QuoteRepository(ZanyContext ctx)
     : base(ctx)
 {
     gameRepo = new GameRepository(ctx);
     mediaRepo = new MediaRepository(ctx);
     zanyRepo = new ZanyRepository(ctx);
 }
Example #2
0
 public GameCommentService(IGameCommentRepository gameCommentRepository, IGameRepository gameRepository, IMessageRemindRepository messageRemindRepository, IGameLikeRepository gameLike)
 {
     _gameCommentRepository = gameCommentRepository;
     _gameRepository = gameRepository;
     _messageRemindRepository = messageRemindRepository;
     _gameLike = gameLike;
 }
 public void Setup()
 {
     GameRepository = new GameRepositoryInMemory();
     GameRepository.AddGame(new Game
     {
         Team1 = "Foo",
         Team2 = "Bar",
         Score1 = 0,
         Score2 = 1
     });
     GameRepository.AddGame(new Game
     {
         Team1 = "Foo",
         Team2 = "Bar",
         Score1 = 1,
         Score2 = 0
     });
     GameRepository.AddGame(new Game
     {
         Team1 = "Foo",
         Team2 = "Bar",
         Score1 = 0,
         Score2 = 1
     });
     GameRepository.AddGame(new Game
     {
         Team1 = "Foo",
         Team2 = "Bar",
         Score1 = 1,
         Score2 = 0
     });
 }
 public HoleService(IHoleRepository holeRepository, IHoleStatisticsRepository holeStatisticsRepository, IGameRepository gameRepository, IShotRepository shotRepository)
 {
     _holeRepository = holeRepository;
     _holeStatisticsRepository = holeStatisticsRepository;
     _gameRepository = gameRepository;
     _shotRepository = shotRepository;
 }
Example #5
0
 public QuoteRepository()
     : base()
 {
     gameRepo = new GameRepository(base.context);
     mediaRepo = new MediaRepository(base.context);
     zanyRepo = new ZanyRepository(base.context);
 }
        public GameQueueAutoStartCommand(IGameRepository gameRepository, IWorkerContext workerContext, TimeSpan gameQueueTimeoutWaiting, int maxNumberOfPlayersPerGame)
        {
            this.gameRepository = gameRepository;
            this.workerContext = workerContext;

            this.gameQueueTimeoutWaiting = gameQueueTimeoutWaiting;
            this.maxNumberOfPlayersPerGame = maxNumberOfPlayersPerGame;
        }
Example #7
0
 public GameService(IGameRepository gameRepository, IGamingConsoleRepository gamingConsoleRepository, IMembershipRepository membershipRepository, 
     IGamingTrend gamingTrend)
 {
     this.gameRepository = gameRepository;
     this.gamingConsoleRepository = gamingConsoleRepository;
     this.membershipRepository = membershipRepository;
     this.gamingTrend = gamingTrend;
 }
 public ShotService(IShotRepository shotRepository, IShotTypeRepository shotTypeRepository, IGameRepository gameRepository, IPlayerRepository playerRepository, IHoleRepository holeRepository)
 {
     _shotRepository = shotRepository;
     _shotTypeRepository = shotTypeRepository;
     _gameRepository = gameRepository;
     _playerRepository = playerRepository;
     _holeRepository = holeRepository;
 }
 public RankingService(IGameRepository gameRepository, IShotRepository shotRepository, IPlayerRepository playerRepository, IRankingRepository rankingRepository, IPlayerGameStatisticsRepository playerGameStatisticsRepository)
 {
     _gameRepository = gameRepository;
     _shotRepository = shotRepository;
     _playerRepository = playerRepository;
     _rankingRepository = rankingRepository;
     _playerGameStatisticsRepository = playerGameStatisticsRepository;
 }
Example #10
0
 public RevenueService(IGameRepository gameRepository, IMembershipRepository membershipRepository, 
     IDailySaleDetailsRepository dailySaleDetailsRepository, IMonthlyExpensesRepository monthlyExpensesRepository)
 {
     this.gameRepository = gameRepository;
     this.membershipRepository = membershipRepository;
     this.dailySaleDetailsRepository = dailySaleDetailsRepository;
     this.monthlyExpensesRepository = monthlyExpensesRepository;
 }
Example #11
0
 public GameManager(IGameRepository gameRepository, IGameValidator gameValidator, IGameCriteria gameCriteria, IGameEngine gameEngine, IRatingRepository ratingRepository)
 {
     _GameRepository = gameRepository;// Ioc.Container.Get<IGameRepository>();
     _GameValidator = gameValidator;
     _GameCriteria = gameCriteria;
     _GameEngine = gameEngine;
     _RatingRepository = ratingRepository;
 }
Example #12
0
        public GamesListPage()
        {
            this.InitializeComponent();
            _gamerepository = ServiceFactory.Current.Create<IGameRepository>();

            MainViewModel.Current.Games = _gamerepository.GetAllForConsole(MainViewModel.Current.SelectedConsole.Id);
            this.DataContext = MainViewModel.Current;
        }
Example #13
0
        public GamesService(IGameRepository repository)
        {
            gamesRepository = repository;
            if (gamesRepository == null)
                throw new ArgumentNullException("Argument cannot be null and should be of type IGamesRepository");


        }
 /// <summary>
 /// Initializes a instance of the SimpleGameEngine class
 /// </summary>
 public SimpleGameEngine(
                 IGameRepository gameRepo,
                 IGameUpdater gameUpdater)
 {
     this.thisLock = new Object();
     this.gameRepository = gameRepo;
     this.gameUpdater = gameUpdater;
 }
Example #15
0
 public ShotService(IShotRepository shotRepository, IShotTypeRepository shotTypeRepository, IGameRepository gameRepository, IPlayerRepository playerRepository, IHoleRepository holeRepository, IUnitOfWork unitOfWork)
 {
     _shotRepository = shotRepository;
     _shotTypeRepository = shotTypeRepository;
     _gameRepository = gameRepository;
     _playerRepository = playerRepository;
     _holeRepository = holeRepository;
     _unitOfWork = unitOfWork;
 }
 public GameService(IGameRepository gameRepository, IShotRepository shotRepository, IPlayerRepository playerRepository, IGameStatisticsRepository gameStatisticsRepository, IPlayerGameStatisticsRepository playerGameStatisticsRepository, IPlayerRivalryStatisticsRepository playerRivalryStatisticsRepository)
 {
     _gameRepository = gameRepository;
     _shotRepository = shotRepository;
     _playerRepository = playerRepository;
     _gameStatisticsRepository = gameStatisticsRepository;
     _playerGameStatisticsRepository = playerGameStatisticsRepository;
     _playerRivalryStatisticsRepository = playerRivalryStatisticsRepository;
 }
Example #17
0
 public GameController(
     IGameRepository gameRepository, 
     ICourseRepository courseRepository, 
     IUserRepository userRepository)
 {
     this.gameRepository = gameRepository;
     this.courseRepository = courseRepository;
     this.userRepository = userRepository;
 }
 public StandingsProvider(IGameRepository gameRepository, IAuthRepository userRepository, ITournamentProvider tournamentProvider)
 {
     if (gameRepository == null) throw new ArgumentNullException(nameof(gameRepository));
     if (userRepository == null) throw new ArgumentNullException(nameof(userRepository));
     if (tournamentProvider == null) throw new ArgumentNullException(nameof(tournamentProvider));
     _gameRepository = gameRepository;
     _userRepository = userRepository;
     _tournamentProvider = tournamentProvider;
 }
Example #19
0
        public GameDataAccess()
        {
            #region MovieDataAccess

            this._unitOfWork = UnitOfWorkFactory.CreateUnitOfWork<Game>();
            this._repository = RepositoryFactory.CreateRepository<IGameRepository, GameRepository>(this._unitOfWork);

            #endregion
        }
Example #20
0
 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;
 }
Example #21
0
		public TicTacToeRound (IReader reader, IDisplayer displayer, IBoardFormatter formatter, Game game, IGameRepository game_repository)
		{
			_reader = reader;
			_displayer = displayer;
			_game = game;
			_round = _game.Current;
			_checker = new BoardWinChecker (_round.Board);
			_formatter = formatter;
			_game_repository = game_repository;
		}
Example #22
0
		public TicTacToeGame (IReader reader, IDisplayer displayer, IBoardFormatter formatter, IPlayerFactory player_factory, IRoundFactory round_factory, Game game, IGameRepository game_repository)
		{
			_game = game;
			_reader = reader;
			_displayer = displayer;
			_formatter = formatter;
			_player_factory = player_factory;
			_round_factory = round_factory;
			_game_repository = game_repository;
		}
Example #23
0
        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 PlayerService(IPlayerRepository playerRepository, IHoleRepository holeRepository, IShotRepository shotRepository, IGameRepository gameRepository, IPlayerStatisticsRepository playerStatisticsRepository, IPlayerHoleStatisticsRepository playerHoleStatisticsRepository, IGameStatisticsRepository gameStatisticsRepository, IPlayerGameStatisticsRepository playerGameStatisticsRepository, IPlayerCareerStatisticsRepository playerCareerStatisticsRepository)
 {
     _playerRepository = playerRepository;
     _holeRepository = holeRepository;
     _shotRepository = shotRepository;
     _gameRepository = gameRepository;
     _playerStatisticsRepository = playerStatisticsRepository;
     _playerHoleStatisticsRepository = playerHoleStatisticsRepository;
     _gameStatisticsRepository = gameStatisticsRepository;
     _playerGameStatisticsRepository = playerGameStatisticsRepository;
     _playerCareerStatisticsRepository = playerCareerStatisticsRepository;
 }
Example #25
0
        public void SetUpFixture()
        {
            _mockGameRespository = Substitute.For<IGameRepository>();
            _mockTeamRepository = Substitute.For<ITeamRepository>();

            _mockTeamRepository.GetTeams().Returns(new List<Team>
            {
                new Team { TeamId = 1, Name = "Team1" },
                new Team { TeamId = 2, Name = "Team2" },
                new Team { TeamId = 3, Name = "Team3" },
                new Team { TeamId = 4, Name = "Team4" }
            });
        }
Example #26
0
        public GameController(IGameRepository games, IUserLoginStore<User, Guid> users)
        {
            if (games == null)
            {
                throw new ArgumentNullException("games");
            }

            if (users == null)
            {
                throw new ArgumentNullException("users");
            }

            _games = games;
            _users = users;
        }
Example #27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GameService"/> class.
        /// </summary>
        /// <param name="teamRepository">Team repository that provides basic CRUD operations against the database.</param>
        /// <param name="gameRepository">Game repository that provides basic CRUD operations against the database.</param>
        public GameService(ITeamRepository teamRepository, IGameRepository gameRepository)
        {
            if (teamRepository == null)
            {
                throw new ArgumentNullException("teamRepository", "teamRepository cannot be null.");
            }

            if (gameRepository == null)
            {
                throw new ArgumentNullException("gameRepository", "gameRepository cannot be null.");
            }

            this.teamRepository = teamRepository;
            this.gameRepository = gameRepository;
        }
Example #28
0
		public TicTacToeRunner (IReader reader, IDisplayer displayer, IBoardFormatter formatter, IPlayerFactory player_factory, IRoundFactory round_factory, IGameFactory game_factory, IGameRepository game_repository)
		{
			_reader = reader;
			_displayer = displayer;
			_game_repository = game_repository;
			_game_factory = game_factory;
			_formatter = formatter;
			_round_factory = round_factory;
			_player_factory = player_factory;

			//on charge la partie dans le repo
			_game_model = _game_repository.Load();

			if(_game_model == null)
				_game_model = game_factory.Create (NUMBER_ROUND);
			
			_game = new TicTacToeGame (_reader, _displayer, formatter, player_factory, round_factory, _game_model, _game_repository);
		}
Example #29
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GamesController"/> class.
        /// </summary>
        /// <param name="gameRepository"> Game repository that is responsible or providing basic CRUD functionality related to games including retrieving, updating, and deleting them from the persistence store.</param>
        /// <param name="gameTypeMapper">Type mapper that maps instances of the Game domain objects to their corresponding DTO type.</param>
        /// <param name="gameService">Services that provides persistence-related operations relevant to games.</param>
        public GamesController(IGameRepository gameRepository, IGameTypeMapper gameTypeMapper, IGameService gameService)
        {
            if (gameRepository == null)
            {
                throw new ArgumentNullException("gameRepository", "gameRepository cannot be null.");
            }

            if (gameTypeMapper == null)
            {
                throw new ArgumentNullException("gameTypeMapper", "gameTypeMapper cannot be null.");
            }

            if (gameService == null)
            {
                throw new ArgumentNullException("gameService", "gameService cannot be null.");
            }

            this.gameRepository = gameRepository;
            this.gameTypeMapper = gameTypeMapper;
            this.gameService = gameService;
        }
Example #30
0
        public GameManager(IGameRepository gameRepository, ITeamRepository teamRepository, IGameOptionRepository optionRepository, IUserPickManager pickManager)
        {
            if (gameRepository == null)
            {
                throw new ArgumentNullException("gameRepository");
            }

            if (teamRepository == null)
            {
                throw new ArgumentNullException("teamRepository");
            }

            if (optionRepository == null)
            {
                throw new ArgumentNullException("optionRepository");
            }

            _gameRepository = gameRepository;
            _teamRepository = teamRepository;
            _optionRepository = optionRepository;
            _pickManager = pickManager;
        }
Example #31
0
 public GameBLL([FromServices] IGameRepository gameRepo) : base(gameRepo)
 {
     this.gameRepository = gameRepo;
 }
Example #32
0
 public GetGameQueryHandler(IGameRepository repository)
 {
     _repository = repository;
 }
 public GameController(IGameRepository repository)
 => _repository = repository;
Example #34
0
 public GameBusiness(IGameRepository GameRepository)
 {
     this.GameRepository = GameRepository;
 }
Example #35
0
 public CartController(IGameRepository repo, IOrderProcessor processor)
 {
     repository     = repo;
     orderProcessor = processor;
 }
Example #36
0
 public GameController(IGameRepository gameRepository)
 {
     _gameRepository = gameRepository;
 }
Example #37
0
 public GamePlayController(IGameRepository _ListRepo)
 {
     this.GameRepository = _ListRepo;
 }
Example #38
0
 public PlayerService(IPlayerRepository playerRepository, IHoleRepository holeRepository, IShotRepository shotRepository, IGameRepository gameRepository, IPlayerStatisticsRepository playerStatisticsRepository, IPlayerHoleStatisticsRepository playerHoleStatisticsRepository, IGameStatisticsRepository gameStatisticsRepository, IPlayerGameStatisticsRepository playerGameStatisticsRepository, IPlayerCareerStatisticsRepository playerCareerStatisticsRepository)
 {
     _playerRepository                 = playerRepository;
     _holeRepository                   = holeRepository;
     _shotRepository                   = shotRepository;
     _gameRepository                   = gameRepository;
     _playerStatisticsRepository       = playerStatisticsRepository;
     _playerHoleStatisticsRepository   = playerHoleStatisticsRepository;
     _gameStatisticsRepository         = gameStatisticsRepository;
     _playerGameStatisticsRepository   = playerGameStatisticsRepository;
     _playerCareerStatisticsRepository = playerCareerStatisticsRepository;
 }
Example #39
0
 public GameHub(IGameRepository gameRepository)
 {
     _gameRepository = gameRepository;
 }
Example #40
0
 public GamelistController(IGameRepository gameRepository, IUnitOfWork unitOfWork)
 {
     _gameRepository = gameRepository;
     _unitOfWork     = unitOfWork;
 }
 public GameService(IGameRepository gameRepository)
 {
     _gameRepository = gameRepository;
 }
 public GameHub(IGameRepository gameRepository, IUserGameSessionRepository userGameSessionRepository)
 {
     this.gameRepository            = gameRepository;
     this.userGameSessionRepository = userGameSessionRepository;
 }
Example #43
0
 public GameAppService(IGameRepository gameRepository)
     : base(gameRepository)
 {
     _gameRepository = gameRepository;
 }
Example #44
0
 public GameHub(IGameRepository repository, ILogger <GameHub> logger, IGameService service)
 {
     _repository = repository;
     _logger     = logger;
     _service    = service;
 }
Example #45
0
 public AdminController(IGameRepository repo)
 {
     repository = repo;
 }
Example #46
0
 public GameController(IGameRepository repo)
 {
     repository = repo;
 }
Example #47
0
 public GameManager(Context context)
 {
     _gameRepository = new GameRepository(context);
 }
Example #48
0
 public GameControllerTest()
 {
     _repository = new GameRepositoryFake();
     _controller = new GameController(_repository);
 }
 public HistoryService(IGameRepository <Game> gameRepository, IRoundRepository <Round> roundRepository)
 {
     _gameRepository  = gameRepository;
     _roundRepository = roundRepository;
 }
Example #50
0
 public PlatformRepository(Context Context, IGameRepository IGameRepository, IAccountRepository IAccountRepository) : base(Context)
 {
     _Context            = Context;
     _IGameRepository    = IGameRepository;
     _IAccountRepository = IAccountRepository;
 }
 public GameService(IGameRepository repository)
     : base(repository)
 {
     _gameRepository = repository;
 }
 public MakeMoveCommandHandler(IGameRepository gameRepo, IEventPublisher eventPublisher)
 {
     _gameRepo       = gameRepo;
     _eventPublisher = eventPublisher;
 }
Example #53
0
 public CreateGameCommandHandler(IGameRepository gameRepository)
 {
     _gameRepository = gameRepository;
 }
 public GameService(IGameRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Example #55
0
 public HolidayTodayJob(IGameRepository repository, ITelegramBotClient client)
 {
     _repository = repository;
     _client     = client;
 }
 public PickWinningAnswerHandler(IGameRepository gameRepository, IHubContextFacade <IGameClient> hubContextFacade, ILogger <IRequestHandler <PickWinningAnswerCommand> > logger)
     : base(gameRepository, hubContextFacade, logger)
 {
 }
Example #57
0
 public GamesController(ApplicationDbContext context, IGameRepository gameRepository)
 {
     _context = context;
     gameRepo = gameRepository;
 }
Example #58
0
 public GameService(ILogger <GameService> logger, IGameRepository repository)
 {
     m_logger     = logger;
     m_repository = repository;
 }
 public SeriesService(ISeriesRepository repository,
                      IGameRepository gameRepository)
 {
     _repository     = repository;
     _gameRepository = gameRepository;
 }
Example #60
0
 public NavController(IGameRepository repo)
 {
     _repository = repo;
 }