コード例 #1
0
 public HomeController(
     IPlayersService playersService,
     IDraftService draftService)
 {
     _playersService = playersService;
     _draftService = draftService;
 }
コード例 #2
0
 public DraftController(
     IDraftService draftService,
     IBroswer broswer,
     IIdentityHelper identityHelper,
     IMapper mapper)
 {
     _draftService   = draftService;
     _broswer        = broswer;
     _identityHelper = identityHelper;
     _mapper         = mapper;
 }
コード例 #3
0
 public FantasyApi(AppDbContext appDbContext
                   , UserManager <ApplicationUser> userManager
                   , IDraftService draftService
                   , ITeamService teamService
                   , IPlayerService playerService)
 {
     this.appDbContext = appDbContext;
     this.userManager  = userManager;
     _draftService     = draftService;
     _teamService      = teamService;
     _playerService    = playerService;
 }
コード例 #4
0
 public FantasyController(IConfiguration configuration
                          , IFantasyProsDataGrabber fantasyProsDataGrabber
                          , AppDbContext appDbContext
                          , UserManager <ApplicationUser> userManager
                          , IDraftService draftService
                          , IPlayerService playerService
                          , ITeamService teamService)
 {
     _configuration          = configuration;
     _fantasyProsDataGrabber = fantasyProsDataGrabber;
     _userManager            = userManager;
     _draftService           = draftService;
     _playerService          = playerService;
     _teamService            = teamService;
 }
コード例 #5
0
        public PlayerDraftMasterViewModel(GameCore core, League league, Func<Player, bool> playerFilter = null)
            : base(core)
        {
            this.league = league;
            this.draftService = new NaiveDraftService();

            Teams = new ObservableCollection<TeamViewModel>();
            DraftRounds = new UpdatableObservableCollection<PlayerDraftRoundViewModel>(new List<PlayerDraftRoundViewModel>());

            IEnumerable<Player> availablePlayers = core.GameState.DraftPool.AvailablePlayers;

            if (playerFilter != null)
            {
                availablePlayers = availablePlayers.Where(playerFilter);
            }

            AvailablePlayers = new ObservableCollection<Player>(availablePlayers);
            ViewHeading = "Player Draft";

            NextPick = new RelayCommand(ProcessNextPick);
            DraftPlayer = new RelayCommand(ProcessDraftPick);
            AutomatePicks = new RelayCommand(() =>
            {
                while (CanDraftPlayer || CanGoToNextPick)
                {
                    if (CanDraftPlayer)
                    {
                        ProcessDraftPick();
                    }
                    if (CanGoToNextPick)
                    {
                        ProcessNextPick();
                    }
                }
            });

            Reload(core);

            ProcessNextPick();
            SelectHumanTeamIfSingle();
        }
コード例 #6
0
        public PlayerDraftMasterViewModel(GameCore core, League league, Func <Player, bool> playerFilter = null) : base(core)
        {
            this.league       = league;
            this.draftService = new NaiveDraftService();

            Teams       = new ObservableCollection <TeamViewModel>();
            DraftRounds = new UpdatableObservableCollection <PlayerDraftRoundViewModel>(new List <PlayerDraftRoundViewModel>());

            IEnumerable <Player> availablePlayers = core.GameState.DraftPool.AvailablePlayers;

            if (playerFilter != null)
            {
                availablePlayers = availablePlayers.Where(playerFilter);
            }

            AvailablePlayers = new ObservableCollection <Player>(availablePlayers);
            ViewHeading      = "Player Draft";

            NextPick      = new RelayCommand(ProcessNextPick);
            DraftPlayer   = new RelayCommand(ProcessDraftPick);
            AutomatePicks = new RelayCommand(() =>
            {
                while (CanDraftPlayer || CanGoToNextPick)
                {
                    if (CanDraftPlayer)
                    {
                        ProcessDraftPick();
                    }
                    if (CanGoToNextPick)
                    {
                        ProcessNextPick();
                    }
                }
            });

            Reload(core);

            ProcessNextPick();
            SelectHumanTeamIfSingle();
        }
コード例 #7
0
 public DraftHub(
     IDraftService draftService)
 {
     _draftService = draftService;
     _connectedUsers = new List<string>();
 }
コード例 #8
0
 public ContentDraftService(IDraftService draftService, ISecurityService securityService)
 {
     this.draftService = draftService;
     this.securityService = securityService;
 }
コード例 #9
0
 public DestroyContentDraftCommand(IDraftService draftService)
 {
     this.draftService = draftService;
 }
コード例 #10
0
 public MatchesController(IDraftService service)
 {
     this.service = service;
 }
コード例 #11
0
 public StandingsController(IDraftService service)
 {
     this.service = service;
 }
コード例 #12
0
 public DestroyContentDraftCommand(IDraftService draftService, IWidgetService widgetService)
 {
     this.draftService  = draftService;
     this.widgetService = widgetService;
 }
コード例 #13
0
 public ContentDraftService(IDraftService draftService, ISecurityService securityService)
 {
     this.draftService    = draftService;
     this.securityService = securityService;
 }
コード例 #14
0
 public StandingsController(IDraftService service)
 {
     this.service = service;
 }
コード例 #15
0
 public MatchesController(IDraftService service)
 {
     this.service = service;
 }
コード例 #16
0
 public DraftSetupController(IDraftService service)
 {
     this.service = service;
 }
コード例 #17
0
 public DraftSetupController(IDraftService service)
 {
     this.service = service;
 }
コード例 #18
0
 public DemoController(IMatchService matchService, IDraftService draftService, IBaseService baseService)
 {
     _matchService = matchService;
     _draftService = draftService;
     _baseService  = baseService;
 }