Exemple #1
0
        public static string ToSeason(this int year, SeasonTypes seasonType)
        {
            var seasonString = string.Empty;

            switch (seasonType)
            {
            case SeasonTypes.REGULAR:
                seasonString = "REG";
                break;

            case SeasonTypes.PRE:
                seasonString = "PRE";
                break;

            case SeasonTypes.POST:
                seasonString = "POST";
                break;

            default:
                seasonString = "REG";
                break;
            }

            return(string.Format("{0}{1}", year, seasonString));
        }
Exemple #2
0
        public WeatherRangeData(HemisphereTypes hemisphere, SeasonTypes season, ClimateTypes climate)
        {
            Temperature   = new List <int>();
            Pressure      = new List <int>();
            CloudCover    = new List <int>();
            Humidity      = new List <int>();
            Precipitation = new List <int>();
            Energy        = new List <int>();
            WindSpeedX    = new List <int>();
            WindSpeedY    = new List <int>();

            Hemisphere = hemisphere;
            Season     = season;
            Climate    = climate;
        }
        public static string ToSeason(this int year, SeasonTypes seasonType)
        {
            var seasonString = string.Empty;

            switch (seasonType)
            {
                case SeasonTypes.REGULAR:
                    seasonString = "REG";
                    break;
                case SeasonTypes.PRE:
                    seasonString = "PRE";
                    break;
                case SeasonTypes.POST:
                    seasonString = "POST";
                    break;
                default:
                    seasonString = "REG";
                    break;
            }

            return string.Format("{0}{1}", year, seasonString);
        }
        public async Task <ScheduledGames> GetAsync(int season, SeasonTypes seasonType)
        {
            string url = string.Format("/{0}/{1}", ScheduleKey, season.ToSeason(seasonType));

            return(await GetRequestAsync <ScheduledGames>(url));
        }
        public ScheduledGames Get(int season, SeasonTypes seasonType)
        {
            string url = string.Format("/{0}/{1}", ScheduleKey, season.ToSeason(seasonType));

            return(GetRequest <ScheduledGames>(url));
        }
 public async Task<ScheduledGames> GetAsync(int season, SeasonTypes seasonType)
 {
     string url = string.Format("/{0}/{1}", ScheduleKey, season.ToSeason(seasonType));
     return await GetRequestAsync<ScheduledGames>(url);
 }
 public ScheduledGames Get(int season, SeasonTypes seasonType)
 {
     string url = string.Format("/{0}/{1}", ScheduleKey, season.ToSeason(seasonType));
     return GetRequest<ScheduledGames>(url);
 }
Exemple #8
0
        private static WeatherRangeData CreateWeatherData(HemisphereTypes hemisphere, SeasonTypes season, ClimateTypes climate,
                                                          int tempLo, int tempHi, int presLo, int presHi,
                                                          int cloudLo, int cloudHi, int humidLo, int humidHi,
                                                          int precipLo,
                                                          int precipHi, int energyLo, int energyHi, int windXLo,
                                                          int windXHi,
                                                          int windYLo, int windYHi)
        {
            var data = new WeatherRangeData(hemisphere, season, climate);

            data.SetData(tempLo, tempHi, presLo, presHi, cloudLo, cloudHi, humidLo, humidHi, precipLo, precipHi,
                         energyLo, energyHi, windXLo, windXHi, windYLo, windYHi);
            return(data);
        }