// GET api/<controller>
        public DayInfo Get()
        {
            string location = "Wellington";
            int daysAway = 0;
            WeatherAccessor accessor = new WeatherAccessor();

            return accessor.GetDayInfo();
        }
 public RequestResult()
 {
     items = new List<CatigoryItemGroup>();
     
     WeatherAccessor accessor = new WeatherAccessor();
     weather = accessor.GetDayInfo();
     ClothingRules rules = new ClothingRules();
     var clothingTempRange = rules.GetClothingCatigory(weather.getTempCAsInt());
     items = TrademeAccessor.getLists(clothingTempRange);
 }
        public RequestResult()
        {
            items = new List <CatigoryItemGroup>();

            WeatherAccessor accessor = new WeatherAccessor();

            weather = accessor.GetDayInfo();
            ClothingRules rules             = new ClothingRules();
            var           clothingTempRange = rules.GetClothingCatigory(weather.getTempCAsInt());

            items = TrademeAccessor.getLists(clothingTempRange);
        }
예제 #4
0
        public RequestResult(string city)
        {
            // TODO: Complete member initialization
            this.city = city;
            items = new List<CatigoryItemGroup>();

            WeatherAccessor accessor = new WeatherAccessor();
            weather = accessor.GetDayInfo(city);
            ClothingRules rules = new ClothingRules();
            var clothingTempRange = rules.GetClothingCatigory(weather);
            items = TrademeAccessor.getLists(clothingTempRange);
        }
 /// <summary>
 /// GET the current weather conditions for a given region. Also includes the current date.
 /// </summary>
 /// <param name="location">The region to get the weather conditions for.</param>
 /// <returns>Day Information</returns>
 public DayInfo Get(string location)
 {
     WeatherAccessor accessor = new WeatherAccessor();
     return accessor.GetDayInfo(location);
 }
 public void Init()
 {
     accessor = new WeatherAccessor();
     Assert.IsNotNull(accessor);
 }