Example #1
0
 public GameService(
     IRoundService roundService,
     GanzenBoardGame.Application.Logging.ILogger logger)
 {
     _roundService = roundService;
     _logger       = logger;
 }
Example #2
0
 public EvaluatorService(IHandService handService, IRoundService roundService, IGroupService groupService, IPlayerGroupService playerGroupService)
 {
     _handService        = handService;
     _roundService       = roundService;
     _groupService       = groupService;
     _playerGroupService = playerGroupService;
 }
Example #3
0
 public AdminController(IRoundService roundService, ISeriesService seriesService, ITeamService teamService, IGameService gameService)
 {
     _seriesService = seriesService;
     _roundService  = roundService;
     _teamService   = teamService;
     _gameService   = gameService;
 }
 //Testing out DI here
 public WeatherForecastController(IUserTournamentService repository, IUserService userRepository, IRoundService roundService, IMatchService matchService)
 {
     _service        = repository;
     _userRepository = userRepository;
     _roundService   = roundService;
     _matchService   = matchService;
 }
Example #5
0
 public HomeController(IHandService handService, IPlayerService playerService, IEvaluatorService evaluatorService, IRoundService roundService)
 {
     _handService      = handService;
     _playerService    = playerService;
     _evaluatorService = evaluatorService;
     _roundService     = roundService;
 }
        public DemoDetailsViewModel(
            IDemosService demosService, IDialogService dialogService, ISteamService steamService,
            ICacheService cacheService, ExcelService excelService, IRoundService roundService)
        {
            _demosService  = demosService;
            _dialogService = dialogService;
            _steamService  = steamService;
            _cacheService  = cacheService;
            _excelService  = excelService;
            _roundService  = roundService;

            Sources = Source.Sources;

            if (IsInDesignMode)
            {
                DispatcherHelper.CheckBeginInvokeOnUI(async() =>
                {
                    Demo = await _cacheService.GetDemoDataFromCache(string.Empty);
                    PlayersTeam1Collection = CollectionViewSource.GetDefaultView(Demo.TeamCT.Players);
                    PlayersTeam2Collection = CollectionViewSource.GetDefaultView(Demo.TeamT.Players);
                    RoundsCollection       = CollectionViewSource.GetDefaultView(Demo.Rounds);
                });
            }

            Messenger.Default.Register <LoadDemoFromAppArgument>(this, HandleLoadFromArgumentMessage);
        }
Example #7
0
 public UserController(IUserService userService, SignInManager <User> signInManager, JwtConfiguration jwtConfiguration, IRoundService roundService)
 {
     _userService      = userService;
     _roundService     = roundService;
     _signInManager    = signInManager;
     _jwtConfiguration = jwtConfiguration;
 }
Example #8
0
        public async Task <IRoundService> AddRoundAsync(IRoundService round)
        {
            await _semaphoreSlim.WaitAsync();

            _rounds.Add(round);
            _semaphoreSlim.Release();
            return(round);
        }
Example #9
0
 public GameController(IGameService gameService, IPlayerService playerService, IRoundService roundService, IMapper mapper)
 {
     _gameService   = gameService;
     _playerService = playerService;
     _roundService  = roundService;
     _mapper        = mapper;
     _logger        = Log.ForContext <GameController>();
 }
Example #10
0
 public Round(IPlayer[] players,
              IRoundService roundService,
              int roundNo)
 {
     _roundService = roundService;
     _players      = players;
     _roundNo      = roundNo;
 }
Example #11
0
 public GameMenuService(IGameService gameService,
                        IRoundService roundService,
                        IHttpContextAccessor httpContextAccessor)
 {
     _gameService  = gameService;
     _roundService = roundService;
     _playerName   = httpContextAccessor.HttpContext.User.Identity.Name;
 }
Example #12
0
 public RoundViewModel(IRoundService roundService, INavigationServiceEx navigationService, IMessengerCache messengerCache)
 {
     _roundService      = roundService;
     _navigationService = navigationService;
     _messengerCache    = messengerCache;
     SelectedRound      = _messengerCache.CachedSelectedRound;
     Messenger.Default.Register <Round>(this, (round) => { SelectedRound = round; });
 }
Example #13
0
 public MatchController(IMatchService matchService,
                        IRoundService roundService,
                        ILeagueService leagueService)
 {
     this.matchService  = matchService;
     this.roundService  = roundService;
     this.leagueService = leagueService;
 }
Example #14
0
 public RoundController(IRoundService roundService,
                        IRoundPointService roundPointService,
                        INotificationHandler notifications)
     : base(notifications)
 {
     _roundService      = roundService;
     _roundPointService = roundPointService;
 }
Example #15
0
        public TournamentController(ITournamentService tournamentService, IFederationService federationService, IRoundService roundService)
        {
            _tournamentService = tournamentService;
            _roundService      = roundService;

            var federations = federationService.GetAll();

            ViewBag.Federations = Mapper.Map <IEnumerable <Federation>, IEnumerable <FederationViewModel> >(federations);
        }
Example #16
0
 public HomeService(
     MotorsportsContext context,
     IQueryExecutor queryExecutor,
     IRoundService roundService)
 {
     _context       = context ?? throw new ArgumentNullException(nameof(context));
     _queryExecutor = queryExecutor ?? throw new ArgumentNullException(nameof(queryExecutor));
     _roundService  = roundService ?? throw new ArgumentNullException(nameof(roundService));
 }
Example #17
0
 public RoundsController(
     IRoundService roundService,
     ISeasonService seasonService,
     IModelStatePopulator <Round, int> roundModelStatePopulator)
 {
     _roundService             = roundService ?? throw new ArgumentNullException(nameof(roundService));
     _seasonService            = seasonService ?? throw new ArgumentNullException(nameof(seasonService));
     _roundModelStatePopulator = roundModelStatePopulator ?? throw new ArgumentNullException(nameof(roundModelStatePopulator));
 }
Example #18
0
        public MainViewModel(ITeamService teamService, IRoundService roundService, INavigationServiceEx navigationService)
        {
            _teamService       = teamService;
            _roundService      = roundService;
            _navigationService = navigationService;
            GetRoundsFromEnabledQuiz();

            _navigationService.Navigated += NavigationService_Navigated;
        }
Example #19
0
        public RoundServiceTests()
        {
            var configuration = new MapperConfiguration(cfg
                                                        => cfg.AddProfile <AutoMapperRoundProfile>());

            _mapper         = new Mapper(configuration);
            _repositoryMock = new Mock <IRoundRepository>();
            _service        = new RoundService(_repositoryMock.Object, _mapper);
        }
        public void Setup()
        {
            _handService        = new HandService(new PlayNGoDBEntities());
            _playerService      = new PlayerService(new PlayNGoDBEntities());
            _roundService       = new RoundService(new PlayNGoDBEntities());
            _groupService       = new GroupService(new PlayNGoDBEntities());
            _playerGroupService = new PlayerGroupService(new PlayNGoDBEntities());

            _evaluatorService = new EvaluatorService(_handService, _roundService, _groupService, _playerGroupService);
        }
 public GameApiService(ICardService cardService,
                       IRoundService roundService,
                       IGameService gameService,
                       IHttpContextAccessor httpContextAccessor)
 {
     _cardService  = cardService;
     _roundService = roundService;
     _gameService  = gameService;
     _playerName   = httpContextAccessor.HttpContext.User.Identity.Name;
 }
        public RoundController(IRoundService roundService
			, IExcelService excelService
			, IMatchService matchService
			, ITeamService teamService)
        {
            _roundService = roundService;
            _excelService = excelService;
            _matchService = matchService;
            _teamService = teamService;
        }
        public CorrectViewModel(ITeamService teamService, IRoundService roundService, INavigationServiceEx navigationService)
        {
            _teamService       = teamService;
            _roundService      = roundService;
            _navigationService = navigationService;

            _teamRoundDictionary = new Dictionary <int, int>();

            FetchListOfEnabledTeams();
            _navigationService.Navigated += NavigationService_Navigated;
        }
Example #24
0
 public GameController(
     IGameService gameService,
     IRoundService roundService,
     IPlayerService playerService,
     ILogService logService)
 {
     _gameService   = gameService;
     _roundService  = roundService;
     _playerService = playerService;
     _logService    = logService;
 }
Example #25
0
 public CompetitionController(
     UserManager <User> userManager,
     IMapper mapper,
     IRoundService roundService,
     IGroupService groupService)
 {
     this.userManager  = userManager;
     this.mapper       = mapper;
     this.roundService = roundService;
     this.groupService = groupService;
 }
 public SignalRHub(ILogger <SignalRHub> logger, IStudentService studentService, ICategoryService categoryService, ICorrectResponsesService correctResponsesService,
                   IGameService gameService, IResponseService responseService, IRoundService roundService, IStudentToGameService studentToGameService)
 {
     m_logger                  = logger;
     m_studentService          = studentService;
     m_categoryService         = categoryService;
     m_correctResponsesService = correctResponsesService;
     m_gameService             = gameService;
     m_responseService         = responseService;
     m_roundService            = roundService;
     m_studentToGameService    = studentToGameService;
 }
Example #27
0
        public ServicesUnitTest()
        {
            RegisterServices();
            _playerService = serviceProvider.GetRequiredService <IPlayerService>();
            _gameService   = serviceProvider.GetRequiredService <IGameService>();
            _roundService  = serviceProvider.GetRequiredService <IRoundService>();

            PlayerNames = new List <string>();
            for (int i = 0; i < 10; i++)
            {
                PlayerNames.Add(GenerateName(5));
            }
        }
Example #28
0
        public Game(IResultsService resultsService,
                    IRoundService roundService,
                    IPlayerService playerService,
                    IMessageService messageService)
        {
            _resultsService = resultsService;
            _roundService   = roundService;
            _playerService  = playerService;
            _messageService = messageService;

            GeneratePlayers();
            rounds = (new Round[noOfRounds]).Select((e, i) => e = new Round(players, _roundService, i + 1)).ToArray();
        }
Example #29
0
        public async Task <ActionResult> Round(
            [FromBody] Round round,
            [FromServices] IRoundService roundService)
        {
            var id = Guid.Parse(round.Id);

            _logger.LogInformation($"User with id {id} connected to round");
            var series = await _seriesStorage.GetByIdAsync(id);

            var openRound = await series.GetOpenRoundAsync() ?? await series.AddRoundAsync(roundService);

            if (!openRound.AddMove(id, round.Move))
            {
                return(BadRequest("Can't add move"));
            }

            return(Ok());
        }
Example #30
0
        public EditorViewModel(
            IRoundService roundService,
            ITopicService topicService,
            IQuestionService questionService)
        {
            _roundService    = roundService;
            _topicService    = topicService;
            _questionService = questionService;

            Rounds    = new ObservableCollection <Round>();
            Topics    = new ObservableCollection <Topic>();
            Questions = new ObservableCollection <Question>();

            _name               = "Введите название";
            _text               = "Введите вопрос";
            _answer             = "Введите ответ";
            _isPreloaderVisible = true;
        }
Example #31
0
        public RoundDetailsViewModel(IDialogService dialogService, IRoundService rounderService, IPlayerService playerService, ICacheService cacheService)
        {
            _dialogService = dialogService;
            _roundService  = rounderService;
            _playerService = playerService;
            _cacheService  = cacheService;

            if (IsInDesignMode)
            {
                DispatcherHelper.Initialize();
                Application.Current.Dispatcher.Invoke(async() =>
                {
                    Demo        = await _cacheService.GetDemoDataFromCache(string.Empty);
                    RoundNumber = 10;
                    await LoadDatas();
                });
            }
        }
Example #32
0
        public RoundViewModel(DialogService dialogService, IRoundService rounderService, IPlayerService playerService, ICacheService cacheService)
        {
            _dialogService = dialogService;
            _roundService  = rounderService;
            _playerService = playerService;
            _cacheService  = cacheService;

            if (IsInDesignMode)
            {
                Application.Current.Dispatcher.Invoke(async() =>
                {
                    DemosDesignService design = new DemosDesignService();
                    CurrentDemo = await design.AnalyzeDemo(new Demo(), CancellationToken.None);
                    RoundNumber = 10;
                    await LoadDatas();
                });
            }
        }
		public RoundViewModel(DialogService dialogService, IRoundService rounderService, IPlayerService playerService, ICacheService cacheService)
		{
			_dialogService = dialogService;
			_roundService = rounderService;
			_playerService = playerService;
			_cacheService = cacheService;

			if (IsInDesignMode)
			{
				Application.Current.Dispatcher.Invoke(async () =>
				{
					DemosDesignService design = new DemosDesignService();
					CurrentDemo = await design.AnalyzeDemo(new Demo(), CancellationToken.None);
					RoundNumber = 10;
					await LoadDatas();
				});
			}
		}