コード例 #1
0
 public MatchesController(IMapper mapper, IMatchService matchService, IMatchStadiumLocationService mslService, ITeamsService teamsService)
 {
     _matchService = matchService;
     _teamService  = teamsService;
     _mapper       = mapper;
     _mslService   = mslService;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlayersController"/>.
 /// </summary>
 /// <param name="playerService">Player service instance</param>
 /// <param name="matchService">Match service instance</param>
 public PlayersController(
     IPlayerService playerService,
     IMatchService matchService)
 {
     _playerService = playerService;
     _matchService  = matchService;
 }
コード例 #3
0
 public CustomerController(IUserService user, IOfferService offer, ISessionService sessService, IMatchService match)
 {
     _user    = user;
     _offer   = offer;
     _session = sessService;
     _match   = match;
 }
コード例 #4
0
        public RebaseController(
            IChampionService championService,
            IItemService itemService,
            ILeagueService leagueService,
            IMasteryService masteryService,
            IMatchService matchService,
            IPlayerService playerService,
            ITeamService teamService,
            ITournamentService tournamentService,
            ISpellService spellService,
            ISerieService serieService,
            ILogger <RebaseController> logger)
        {
            _championService   = championService ?? throw new ArgumentNullException(nameof(championService));
            _itemService       = itemService ?? throw new ArgumentNullException(nameof(itemService));
            _leagueService     = leagueService ?? throw new ArgumentNullException(nameof(leagueService));
            _masteryService    = masteryService ?? throw new ArgumentNullException(nameof(masteryService));
            _matchService      = matchService ?? throw new ArgumentNullException(nameof(matchService));
            _playerService     = playerService ?? throw new ArgumentNullException(nameof(playerService));
            _serieService      = serieService ?? throw new ArgumentNullException(nameof(serieService));
            _spellService      = spellService ?? throw new ArgumentNullException(nameof(spellService));
            _teamService       = teamService ?? throw new ArgumentNullException(nameof(teamService));
            _tournamentService = tournamentService ?? throw new ArgumentNullException(nameof(tournamentService));

            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            pandaScoreAccessToken = Environment.GetEnvironmentVariable("PandaScoreAPIAccessToken");
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of GeneratorService
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="tableService"></param>
 public GeneratorService(ICoalDatabaseSettings settings, ITableService tableService, IMatchService matchService)
 {
     this.ConnectToDb(settings);
     this.settings     = settings;
     this.tableService = tableService;
     this.matchService = matchService;
 }
コード例 #6
0
 public MatchController(IMatchService pridctService, IMapper mapper, IExceptionService exceptionService, IPredictionService predictionService)
 {
     _mapper            = mapper;
     _exceptionService  = exceptionService;
     _matchService      = pridctService;
     _predictionService = predictionService;
 }
コード例 #7
0
 public MatchesController(ITeamsService ts, IMatchService ms, IMapper mapper, IPredictionsService ps)
 {
     this.ts     = ts;
     this.ms     = ms;
     this.mapper = mapper;
     this.ps     = ps;
 }
コード例 #8
0
 public HomeController(IMatchService matchService, IPlayerService playerService, IFantasyService fantasyService, IHostingEnvironment env)
 {
     _matchService   = matchService;
     _playerService  = playerService;
     _fantasyService = fantasyService;
     _env            = env;
 }
コード例 #9
0
 public CandidateController(ILogger <CandidateController> logger, IJobAdderService jobAdderService, IMatchService matchService, JobSkillWeightService jobSkillWeightService)
 {
     _logger                = logger;
     _jobAdderService       = jobAdderService;
     _matchService          = matchService;
     _jobSkillWeightService = jobSkillWeightService;
 }
コード例 #10
0
        public ScoreViewModel(IMatchService matchService,
                              IPlayerInningService playerInningService,
                              string matchId, string teamId, bool IsBatsman)
        {
            _matchService        = matchService ?? throw new ArgumentNullException($"MatchService is null");
            _playerInningService = playerInningService ?? throw new ArgumentNullException($"PlayerInningService is null");

            CurrentMatch = _matchService.GetMatch(matchId);
            IList <PlayerInning> batsman;
            IList <PlayerInning> bowler;

            if ((IsBatsman && CurrentMatch.HomeTeam.Id == teamId) || (!IsBatsman && CurrentMatch.AwayTeam.Id == teamId))
            {
                BattingTeamName = CurrentMatch.HomeTeam.TeamName;
                batsman         = _playerInningService.GetAllPlayerInningsByTeamMatchId(CurrentMatch.HomeTeam.Id, matchId);
                bowler          = _playerInningService.GetAllPlayerInningsByTeamMatchId(CurrentMatch.AwayTeam.Id, matchId);
            }
            else if ((IsBatsman && CurrentMatch.AwayTeam.Id == teamId) || (!IsBatsman && CurrentMatch.HomeTeam.Id == teamId))
            {
                BattingTeamName = CurrentMatch.AwayTeam.TeamName;
                batsman         = _playerInningService.GetAllPlayerInningsByTeamMatchId(CurrentMatch.AwayTeam.Id, matchId);
                bowler          = _playerInningService.GetAllPlayerInningsByTeamMatchId(CurrentMatch.HomeTeam.Id, matchId);
            }
            else
            {
                throw new ArgumentException("Team Id is invalid");
            }

            ActiveBatsman  = batsman.Where(p => p.HowOut == "not out").ToList();
            ActiveBowler   = bowler.ToList();
            Fielder_Keeper = bowler.ToList();
        }
コード例 #11
0
 public MatchController(
     IMatchService matchService,
     IMatchResultService matchResultService)
 {
     this.matchService       = matchService;
     this.matchResultService = matchResultService;
 }
コード例 #12
0
 public MatchesController(IHubContext <SportHub> sportHub, IMatchService matchService, SportDbContext context, IMapper mapper)
 {
     this.sportHub     = sportHub;
     this.matchService = matchService;
     this.context      = context;
     this.mapper       = mapper;
 }
コード例 #13
0
 public ProfileController(IUserForecastService userForecastService, IMatchService matchService,
                          ITeamService teamService)
 {
     this.userForecastService = userForecastService;
     this.matchService        = matchService;
     this.teamService         = teamService;
 }
コード例 #14
0
ファイル: TeamService.cs プロジェクト: hemane/Backend
 public TeamService(HemaneContext context, IUserService userService, IClubService clubService, IMatchService matchService)
 {
     _context      = context;
     _userService  = userService;
     _clubService  = clubService;
     _matchService = matchService;
 }
コード例 #15
0
 public LeagueService(ILeagueRepository leagueRepository, IMapper mapper, IMatchService matchService, IMatchRepository matchRepository)
 {
     _matchRepository  = matchRepository;
     _matchService     = matchService;
     _leagueRepository = leagueRepository;
     _mapper           = mapper;
 }
コード例 #16
0
 //Testing out DI here
 public WeatherForecastController(IUserTournamentService repository, IUserService userRepository, IRoundService roundService, IMatchService matchService)
 {
     _service        = repository;
     _userRepository = userRepository;
     _roundService   = roundService;
     _matchService   = matchService;
 }
コード例 #17
0
        public static void Create(IMatchService matchService)
        {
            var match = matchService.Create("Napoli", "Roma");

            match.UpdateMatchStatus(MatchStatus.FirstHalf);

            match.UpdateHomeScore("Higuain");
            match.UpdateHomeScore("Higuain");
            match.UpdateHomeScore("Callejon");
            match.UpdateHomeScore("Mertens");

            match.UpdateMatchStatus(MatchStatus.HalfTime);

            matchService.Update(match);

            Console.WriteLine("Half time score {0}", match.Result);

            match.UpdateMatchStatus(MatchStatus.SecondHalf);

            match.UpdateAwayScore("Totti");

            match.UpdateHomeScore("Jorginho");

            match.UpdateMatchStatus(MatchStatus.Ended);

            Console.Write(match.GetMatchStatus());
            Console.WriteLine("Final score {0}", match.Result);

            matchService.Update(match);

            Console.WriteLine("***Some stats***");
            Console.WriteLine("Higuain scored {0} goal", match.GoalsPerHomePlayer("Higuain"));
            Console.WriteLine("Totti scored {0} goal", match.GoalsPerAwayPlayer("Totti"));
        }
コード例 #18
0
 public WarmupService(
     IMatchDal matchDal,
     IMatchService matchService)
 {
     _matchDal     = matchDal;
     _matchService = matchService;
 }
コード例 #19
0
 public MatchServiceTest()
 {
     _matchService   = new MatchService(GetInMemoryTeamRepository());
     _rafflesService = new RafflesService(GetInMemoryTeamRepository());
     _teamRepository = GetInMemoryTeamRepository();
     finals          = new List <Team>();
 }
コード例 #20
0
        public static IEnumerable <Match> SetStartTimeForAllMatches(IMatchService matchService)
        {
            var matches = matchService.GetAll().ToList();

            foreach (var item in MatchTimeIntervalMapper.Items)
            {
                var itemMatches = matches.Where(m => (m.TournamentType == item.TournamentType) &&
                                                m.Number >= item.MatchesInterval[0] &&
                                                m.Number <= item.MatchesInterval[1])
                                  .Select(m => m).ToList();

                var intervalMinutes = (item.EndHour - item.BeginHour) * 60;
                var matchDate       = GetNextDayOfWeek(item.DayOfWeek);

                matchDate = matchDate.AddHours(item.BeginHour);

                var matchesPerMinute = (int)Math.Ceiling((double)itemMatches.Count / intervalMinutes);

                var currentMinute = 0;
                var counter       = 0;
                foreach (var m in itemMatches)
                {
                    m.StartTime = matchDate.AddMinutes(currentMinute);

                    counter++;
                    if (counter == matchesPerMinute)
                    {
                        currentMinute++;
                        counter = 0;
                    }
                }
            }

            return(matches);
        }
コード例 #21
0
        public BackgroundMatchServerTimer(IMatchService matchService)
        {
            this.matchService = matchService;
            this.matchHub     = GlobalHost.ConnectionManager.GetHubContext <MatchHub>();

            this.StartTimer();
        }
コード例 #22
0
 public MatchesController(IMatchService matchService, IPlayerService playerService, ITeamService teamService, IMatchTeamPlayerService matchTeamPlayerService)
 {
     _matchService           = matchService;
     _playerService          = playerService;
     _teamService            = teamService;
     _matchTeamPlayerService = matchTeamPlayerService;
 }
コード例 #23
0
 public DataService(IBetListClient client, IConvert convert, ITournamentClient tournamentClient, ITeamClient teamClient, IMatchService matchService)
 {
     this.betListClient    = client;
     this.convert          = convert;
     this.tournamentClient = tournamentClient;
     this.teamClient       = teamClient;
     this.matchService     = matchService;
 }
コード例 #24
0
 public MatchController(IMatchService matchService,
                        IControllerRequestResolver resolver,
                        IMatchMobileService matchMobileService)
 {
     _matchService       = matchService;
     _resolver           = resolver;
     _matchMobileService = matchMobileService;
 }
コード例 #25
0
 public BuyController(IUserService userService,
                      IBuyService buyService,
                      IMatchService matchService)
 {
     _matchService = matchService;
     _buyService   = buyService;
     _userService  = userService;
 }
コード例 #26
0
 public XmlService(IBetService betService, IEventService eventService, IMatchService matchService, IOddService oddService, ISportService sportService)
 {
     this.betService   = betService;
     this.eventService = eventService;
     this.matchService = matchService;
     this.oddService   = oddService;
     this.sportService = sportService;
 }
コード例 #27
0
 public MatchAdminController(IMatchAdminService matchAdminService,
                             IMatchService matchService,
                             ILeagueService leagueService)
 {
     this.matchAdminService = matchAdminService;
     this.matchService      = matchService;
     this.leagueService     = leagueService;
 }
コード例 #28
0
 public TeamController(IMapper mapper, ITeamService teamService, DataContext context, IMatchService matchService, IPlayerService playerService)
 {
     _playerService = playerService;
     _matchService  = matchService;
     _context       = context;
     _mapper        = mapper;
     _teamService   = teamService;
 }
コード例 #29
0
 public ScorePageViewModel(
     INavigationService navigationService,
     IMatchService matchService)
     : base(navigationService)
 {
     this.matchService = matchService;
     Task.Run(Initialize).Wait();
 }
コード例 #30
0
        public MatchesPageViewModel(INavigationService navigationService, IMatchService matchService, ITeamService teamService) : base(navigationService)
        {
            Matches = new ObservableCollection <Match>();

            AddMatchCommand = new DelegateCommand(AddMatch);
            _matchService   = matchService;
            _teamService    = teamService;
        }
コード例 #31
0
        public RoundController(IRoundService roundService
			, IExcelService excelService
			, IMatchService matchService
			, ITeamService teamService)
        {
            _roundService = roundService;
            _excelService = excelService;
            _matchService = matchService;
            _teamService = teamService;
        }
コード例 #32
0
 public MatchController(IMatchService matchService)
 {
     m_MatchService = matchService;
 }
コード例 #33
0
 public CompetitorsController(IRepository repository, IMatchService matchService)
 {
     _repository = repository;
     _matchService = matchService;
 }
コード例 #34
0
ファイル: MatchController.cs プロジェクト: shunno/CricCard
 public MatchController(IMatchService matchService, IUnitOfWorkAsync unitOfWorkAsync)
 {
     _matchService = matchService;
     _unitOfWorkAsync = unitOfWorkAsync;
 }
コード例 #35
0
 public MatchesController(IRepository repository, IMatchService matchService)
 {
     _repository = repository;
     _service = matchService;
 }