-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWheather.cs
50 lines (46 loc) · 1.27 KB
/
Wheather.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Xml.Linq;
namespace Tinyweather
{
public class Weather
{
Location _location;
Location Location
{
get { return _location; }
set { _location = value; }
}
/// <summary>
/// Weather constructor.
/// </summary>
/// <returns></returns>
public Weather(Int32 locationID)
{
_location = new Location(locationID);
}
/// <summary>
/// Gets the current wheather information.
/// </summary>
/// <returns></returns>
public CurrentWeather GetCurrentWeather()
{
CurrentWeather currentWeather = new CurrentWeather();
currentWeather.GetWeather(_location.LocationID, UnitsOfTemperature.Celsius);
return currentWeather;
}
/// <summary>
/// Gets the list of wheather forecasts.
/// </summary>
/// <returns></returns>
public Forecast GetForecast()
{
Forecast forecast = new Forecast();
forecast.GetForecast(_location.LocationID, UnitsOfTemperature.Celsius);
return forecast;
}
}
}