Beispiel #1
0
 public GamesController(IGamesService gamesService, IPlayerGameStatsService playerGameStatsService)
 {
     _gamesService           = gamesService;
     _playerGameStatsService = playerGameStatsService;
 }
Beispiel #2
0
 public GamesController(IGamesService gamesService)
 {
     _gamesService = gamesService;
 }
Beispiel #3
0
 public GamesController(IGamesService service)
 {
     _service = service;
 }
Beispiel #4
0
 public GamesController(IGamesService _gamesService)
 {
     gamesService = _gamesService;
 }
Beispiel #5
0
 public GameAddConsumer(IGamesService gamesService)
 => this.gamesService = gamesService;
Beispiel #6
0
 public SingleGameRegisteredProjectionConsumer(IGamesService gamesService, IPublishEndpoint publisher, ILogger <SingleGameRegisteredProjectionConsumer> logger)
 {
     _gamesService = gamesService ?? throw new ArgumentNullException(nameof(gamesService));
     _publisher    = publisher ?? throw new ArgumentNullException(nameof(publisher));
     _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Beispiel #7
0
 public GamblersController(IGamblersService gamblers, IGamesService games)
 {
     this.gamblers = gamblers;
     this.games    = games;
 }
 public GamesController(IGamesService gamesService, IMapper mapper)
 {
     this.gamesService = gamesService;
     this.mapper       = mapper;
 }
 public NewGamesViewComponent(IGamesService gamesService)
 {
     this.gamesService = gamesService;
 }
Beispiel #10
0
        /// <summary>
        /// Initializes new instance of GamesViewModel
        /// </summary>
        public GamesViewModel(INavigationService navigation, IGamesService gamesService, IGameImageService gameImageService, ICartService cartService)
        {
            this.navigation = navigation;
            this.gamesService = gamesService;
            this.gameImageService = gameImageService;
            this.cartService = cartService;

            gamesCollection = new ObservableCollection<Game>();

            title = "Find games";
            GameDetailsVisible = false;
            PreviousButtonVisible = false;
            GoForwardButtonVisible = false;

            if (!String.IsNullOrEmpty(GameStore.WindowsApp.Common.UserInfo.Username))
                ShowUserLogged = true;

            // Notify when user name is changed
            GameStore.WindowsApp.Common.UserInfo.OnUserNameChange += () =>
            {
                if (String.IsNullOrEmpty(GameStore.WindowsApp.Common.UserInfo.Username))
                    ShowUserLogged = false;
                else
                    ShowUserLogged = true;
            };
        }
Beispiel #11
0
 public GamesController(ILogger <GamesController> logger, IGamesService gamesService)
 {
     _logger       = logger;
     _gamesService = gamesService;
 }
 public GamesController(IGamesService games, IGuessService guesses)
 {
     this.games   = games;
     this.guesses = guesses;
 }
Beispiel #13
0
 public GameTypesController(IGamesService gamesService)
 {
     _gamesService = gamesService ?? throw new ArgumentNullException(nameof(gamesService));
 }
Beispiel #14
0
 public void SetUp()
 {
     Setup();
     _service = new GamesService(Mapper, RepoMock.Object);
 }
Beispiel #15
0
 public CurrentlyPlayingTileViewModel(IGamesService gamesService)
 {
     _gamesService = gamesService;
 }
 public GuessService(IGamesService games, IRepository<Guess> guesses)
 {
     this.games = games;
     this.guesses = guesses;
 }
Beispiel #17
0
 public GuessService(IGamesService games, IRepository <Guess> guesses)
 {
     this.games   = games;
     this.guesses = guesses;
 }
Beispiel #18
0
 public RankingsService(IUnitOfWork unitOfWork, IGamesService gamesService, IMapper mapper)
 {
     this.gamesService = gamesService;
     this.unitOfWork   = unitOfWork;
     this.mapper       = mapper;
 }
Beispiel #19
0
        public async Task <IActionResult> Index(GameNewVm model, [FromServices] GoogleRecaptchaService recaptcha, [FromServices] IGamesService games)
        {
            model.GoogleRecaptchaApiKey = this._config.GoogleRecaptcha.ApiKey;

            if (ModelState.IsValid)
            {
                //Captcha
                string recaptchaResponse = this.Request.Form["g-recaptcha-response"];
                if (!await recaptcha.ValidateRecaptcha(this._config.GoogleRecaptcha.ApiSecret, recaptchaResponse))
                {
                    return(ViewAlertMessageDanger(model, "Access denied", "Invalid captcha token."));
                }

                //Create form
                Guid session = Guid.NewGuid();
                Game game    = new Game()
                {
                    CreatedAt    = DateTime.UtcNow,
                    HandAuthor   = model.Hand,
                    ID_Session   = session,
                    NameAuthor   = model.NameAuthor,
                    NameOpponent = model.NameOpponent,
                    Memo         = model.Memo,
                    Trophy       = model.Trophy,
                };
                Game result = games.Create(game);

                //Create authors cookie
                this.Response.Cookies.Append("GameRPS_" + result.ID.ToString(), session.ToString(), new Microsoft.AspNetCore.Http.CookieOptions()
                {
                    Expires = DateTime.Now.AddMonths(1),
                });

                return(RedirectAlertInfo("/" + result.ID.ToString(), "Success", "The game has been successfully created."));
            }

            return(ViewAlertMessageDanger(model, "No valid data", "Please enter valid data: login, password, captcha."));
        }
 public GamesController(IGamesService gamesService,
                        IGameImageService gameImageService)
 {
     _gamesService     = gamesService;
     _gameImageService = gameImageService;
 }
Beispiel #21
0
 public GameHub(IGamesService gamesService)
 {
     _gamesService = gamesService;
 }
 public HomeController(IGamesService gamesService)
 {
     this.gamesService = gamesService;
 }
 public RegisterSingleGameCommandConsumer(IGamesService gamesService, IPublishEndpoint publisher, ILogger <RegisterSingleGameCommandConsumer> logger)
 {
     _publisher = publisher ?? throw new ArgumentNullException(nameof(publisher));
     _logger    = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Beispiel #24
0
 public LOLController(IGamesService gamesService)
 {
     this.gamesService = gamesService;
 }
Beispiel #25
0
 public HomeController()
 {
     this.gamesService = NinjectProvider.Kernel().Get <IGamesService>();
 }
Beispiel #26
0
 public GamesController(IGamesService gamesService, UserManager <GoUser> userManager)
 {
     this.gamesService = gamesService;
     this.userManager  = userManager;
 }
 public HomeController(UserManager <ApplicationUser> userManager, INewsService newsService, IGamesService gamesService,
                       IMyTeamsService myTeamsService, IPlayerGameStatsService playerGameStatsService)
 {
     _userManager            = userManager;
     _newsService            = newsService;
     _gamesService           = gamesService;
     _myTeamsService         = myTeamsService;
     _playerGameStatsService = playerGameStatsService;
 }
 public ChessHub(IGamesService gamesService, IMovesService movesService, IMessagesService messagesService)
 {
     this.gamesService    = gamesService;
     this.movesService    = movesService;
     this.messagesService = messagesService;
 }
Beispiel #29
0
 public StatisticsService(IGamesService gamesService, EloConfiguration eloConfiguration, IEloCalculatorFactory eloCalculatorFactory)
 {
     _gamesService         = gamesService ?? throw new ArgumentNullException(nameof(gamesService));
     _eloConfiguration     = eloConfiguration ?? throw new ArgumentNullException(nameof(eloConfiguration));
     _eloCalculatorFactory = eloCalculatorFactory ?? throw new ArgumentNullException(nameof(eloCalculatorFactory));
 }
Beispiel #30
0
 public LobbyController(ILobbyService lobbyService, IGamesService gamesService, IMapper mapper)
 {
     _lobbyService = lobbyService;
     _gamesService = gamesService;
     _mapper       = mapper;
 }
Beispiel #31
0
 public GameEditAuthorizationHandler(IGamesService gamesService)
 {
     _gamesService = gamesService ?? throw new ArgumentNullException(nameof(gamesService));
 }
Beispiel #32
0
        /// <summary>
        /// Constructor
        /// </summary>
        public CartViewModel(INavigationService navigationService, ICartService cartService, IGamesService gameService,
            IOrderService orderService)
        {
            this.navigationService = navigationService;
            this.cartService = cartService;
            this.gameService = gameService;
            this.orderService = orderService;

            Order = new Order();
        }
 public GamesController(IGamesService games, IGuessService guesses)
 {
     this.games = games;
     this.guesses = guesses;
 }
Beispiel #34
0
 public GamesController(IGamesService gamesService)
 {
     _gamesService = gamesService;
 }
Beispiel #35
0
 public HangmanService(DatabaseContext db, IGamesService gamesService)
 {
     Context      = db;
     GamesService = gamesService;
 }