Пример #1
0
        public AddMatchViewModel(IMatchService matchService,
                                 ITeamService teamService,
                                 IPlayerInningService playerInningService,
                                 IUmpireService umpireService)
        {
            _matchService        = matchService ?? throw new ArgumentNullException($"MatchService is null");
            _teamService         = teamService ?? throw new ArgumentNullException($"TeamService is null");
            _playerInningService = playerInningService ?? throw new ArgumentNullException($"PlayerInningService is null");
            _umpireService       = umpireService ?? throw new ArgumentNullException($"PlayerInningService is null");

            Teams   = _teamService.GetTeams().ToList();
            Matches = _matchService.GetMatches().ToList();
            var UmpiresListWithDupes = _umpireService.GetUmpires().ToList();

            Umpires = UmpiresListWithDupes.Distinct().ToList();
        }
Пример #2
0
 public TennisGameService(IUmpireService umpireService)
 {
     _umpireService = umpireService;
 }
Пример #3
0
 public AddDialogViewModel(IUmpireService umpireService)
 {
     Title          = "Add Umpire";
     _umpireService = umpireService;
 }