public CreateGameHandler(IMinesweeperFactory minesweeper_factory, IGameRepository game_repository, IGameTypeMapper game_options_mapper, IBus bus) { _minesweeper_factory = minesweeper_factory; _game_repository = game_repository; _game_options_mapper = game_options_mapper; _bus = bus; }
/// <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; }