// Constructor for design time //public SelectCompetitionViewModel() //{ // _dataService = SimpleIoc.Default.GetInstance<IFootballDataService>(); // _navigationService = null; // GetAvailableCompetitionsCommand = new AsyncCommand<List<Competition>>(() => _dataService.GetAvailableCompetitionsAsync()); // GetAvailableCompetitionsCommand.Execute(null); //} public SelectCompetitionViewModel(IFootballDataService dataService, INavigationService navigationService) { _dataService = dataService; _navigationService = navigationService; _dialogService = null; GetAvailableCompetitionsCommand = new AsyncCommand <List <Competition> >(() => _dataService.GetAvailableCompetitionsAsync()); }
public LeaguesService( IUnitOfWork unitOfWork, IFootballDataService footballDataService, IBatchFactory batchFactory, IMapper mapper) { _unitOfWork = unitOfWork; _footballDataService = footballDataService; _batchFactory = batchFactory; _mapper = mapper; }
// Contructor for DesignTime Only public CompetitionViewModel() { _competition = new Competition() { Id = 11, Name = "MyCompetition" }; _dataService = SimpleIoc.Default.GetInstance <IFootballDataService>(); GetCurrentStandingsCommand = new AsyncCommand <List <Team> >(() => _dataService.GetCurrentStandingsAsync(_competition.Id)); GetTodayFixturesCommand = new AsyncCommand <List <Match> >(() => _dataService.GetFixturesForDateAsync(_competition.Id, DateTime.Today)); GetTodayFixturesCommand.Execute(null); GetCurrentStandingsCommand.Execute(null); }
public CompetitionViewModel(Competition competition, IFootballDataService dataService) { _competition = competition; _dataService = dataService; GetCurrentStandingsCommand = new AsyncCommand <List <Team> >(() => _dataService.GetCurrentStandingsAsync(_competition.Id)); GetTodayFixturesCommand = new AsyncCommand <List <Match> >(() => _dataService.GetFixturesForDateAsync(_competition.Id, DateTime.Today)); //if (IsInDesignMode) //{ // GetTodayFixturesCommand.Execute(null); // GetCurrentStandingsCommand.Execute(null); //} }
public CompetitionViewModelService( ILoggerFactory loggerFactory, IFootballDataService footballDataService, IAsyncRepository <CompetitionArea> areaRepository, IAsyncRepository <Competition> competitionRepository, IAsyncRepository <Team> teamRepository, IAsyncRepository <Standing> standingRepository, IAsyncRepository <TableItem> tableItemRepository) { _logger = loggerFactory.CreateLogger <CompetitionViewModelService>(); _footballDataService = footballDataService; _areaRepository = areaRepository; _competitionRepository = competitionRepository; _standingRepository = standingRepository; _teamRepository = teamRepository; _tableItemRepository = tableItemRepository; }
public SelectCompetitionViewModel(IFootballDataService dataService, INavigationService navigationService, IDialogService dialogService) { _dataService = dataService; _navigationService = navigationService; _dialogService = dialogService; //_getAvailableCompetitionsCommand = new AsyncCommand<List<Competition>>(() => _dataService.GetAvailableCompetitionsAsync()); //GetAvailableCompetitionsCommand.Execution.PropertyChanged += (s, e) => //{ // if (e.PropertyName.Equals("IsFaulted")) // { // DisplayErrorMessage(); // } //}; //if (IsInDesignMode) //{ // GetAvailableCompetitionsCommand.Execute(null); //} }
public StandingsController(IFootballDataService footballDataService, IMapper mapper) { _footballDataService = footballDataService; _mapper = mapper; }
public Application(IFootballDataService footballDataService, IFootballBetDataService footballBetDataService, IEnglishSoccerDataService englishSoccorDataService) { this.footballDataService = footballDataService; this.footballBetDataService = footballBetDataService; this.englishSoccorDataService = englishSoccorDataService; }
public CompetitionController(IFootballDataService footballDataService, IMapper mapper, IMemoryCache memoryCache) { _footballDataService = footballDataService; _mapper = mapper; _cache = memoryCache; }