Exemple #1
0
        public void AddCompetition()
        {
            CompetitionModel cm = new CompetitionModel(CompetitionName, FixedTeams, RandomisedTeams);

            CompetitionServices.GetOrCreateCompetition(cm);
            Competitions.Add(cm);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="apiBaseUrl"></param>
        /// <param name="primarySubscriptionKey"></param>
        /// <param name="secondarySubscriptionKey"></param>
        public FantasySoccerClient(string primarySubscriptionKey, string secondarySubscriptionKey)
        {
            Uri statApiBaseUrl       = SoccerConfig.StateApiBaseUrl;
            Uri scoreApiBaseUrl      = SoccerConfig.ScoreApiBaseUrl;
            Uri ProjectionApiBaseUrl = SoccerConfig.ProjectionApiBaseUrl;

            AreaServices        = new AreaServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            CompetitionServices = new CompetitionServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            SeasonServices      = new SeasonServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            BoxScoreServices    = new BoxScoreService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            GameServices        = new GameServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            MembershipServices  = new MembershipServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);

            PlayerGameStatServices   = new PlayerGameStatServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerSeasonStatServices = new PlayerSeasonStatServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerServices           = new PlayerServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            ScheduleServices         = new ScheduleServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            SeasonServices           = new SeasonServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            StandingServices         = new StandingServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamGameServices         = new TeamGameServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamSeasonService        = new TeamSeasonService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamServices             = new TeamServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            VenueServices            = new VenueServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);

            ProjectionServices = new ProjectionServices(ProjectionApiBaseUrl.AbsoluteUri, SoccerConfig.ProjectionPrimarySubscriptionKey, SoccerConfig.ProjectionSecondarySubscriptionKey);
        }
Exemple #3
0
 public CompetitionViewModel(IMvxNavigationService navigationService)
 {
     Competitions           = new MvxObservableCollection <CompetitionModel>(CompetitionServices.GetAllCompetitions());
     AddCompetitionCommand  = new MvxCommand(AddCompetition);
     PlayCompetitionCommand = new MvxCommand(PlayCompetition);
     ResetDatabaseCommand   = new MvxCommand(ResetDatabase);
     _navigationService     = navigationService;
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="apiBaseUrl"></param>
        /// <param name="primarySubscriptionKey"></param>
        /// <param name="secondarySubscriptionKey"></param>

        public SportDataCSGOClient(string primarySubscriptionKey, string ProjectionPrimarySubscriptionKey)
        {
            Uri scoreApiBaseUrl      = CSGOConfig.ScoreApiBaseUrl;
            Uri statApiBaseUrl       = CSGOConfig.StateApiBaseUrl;
            Uri ProjectionApiBaseUrl = CSGOConfig.ProjectionApiBaseUrl;

            AreasServices       = new AreaServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            CompetitionServices = new CompetitionServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            GameServices        = new GameServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            MembershipServices  = new MembershipServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            PlayerServices      = new PlayerServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            SeasonServices      = new SeasonServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            ScheduleServices    = new ScheduleServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            TeamServices        = new TeamServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);
            VenueServices       = new VenueServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey);

            BoxScoreServices = new BoxScoreServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey);

            ProjectionServices = new ProjectionServices(ProjectionApiBaseUrl.AbsoluteUri, ProjectionPrimarySubscriptionKey);
        }
Exemple #5
0
        public void ResetDatabase()
        {
            bool loadData = true;

            _ = new DBInstaller(BaseDataAccess.DB_FILE, loadData);

            if (loadData)
            {
                // Create Competitions
                var burgerComp = CompetitionServices.GetOrCreateCompetition(new CompetitionModel("Burger Empire", "/Images/canasta_champions.png", true, false));
                var daveComp   = CompetitionServices.GetOrCreateCompetition(new CompetitionModel("Dave's Canasta Regulars", "/Images/no_image.jpg", false, true));

                // Add Players
                var ben    = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Ben"));
                var jen    = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Jen"));
                var nathan = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Nathan"));
                var danni  = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Danni"));
                var rowan  = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Rowan"));
                var poly   = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Poly"));
                var kitty  = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Kitty"));
                var droot  = CompetitionServices.GetOrCreatePlayer(new PlayerModel("Droot"));

                // Register Players to Competition
                CompetitionServices.RegisterPlayer(burgerComp.CompetitionID, ben.PlayerID);
                CompetitionServices.RegisterPlayer(burgerComp.CompetitionID, jen.PlayerID);
                CompetitionServices.RegisterPlayer(burgerComp.CompetitionID, nathan.PlayerID);
                CompetitionServices.RegisterPlayer(burgerComp.CompetitionID, danni.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, ben.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, jen.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, poly.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, rowan.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, kitty.PlayerID);
                CompetitionServices.RegisterPlayer(daveComp.CompetitionID, droot.PlayerID);

                // Register Teams
                CompetitionServices.RegisterTeam(burgerComp.CompetitionID, ben.PlayerID, nathan.PlayerID);
                CompetitionServices.RegisterTeam(burgerComp.CompetitionID, jen.PlayerID, danni.PlayerID);
            }
        }
 public CompetitionChartController()
 {
     service      = new CompetitionServices();
     matchservice = new MatchServices();
 }
Exemple #7
0
 public MatchController()
 {
     service     = new MatchServices();
     serviceComp = new CompetitionServices();
 }