Revize 0da0ac88
Přidáno uživatelem Alex Konig před asi 4 roky(ů)
Server/Parser 1.0/Program.cs | ||
---|---|---|
1 |
using System; |
|
1 |
using Parser_1._0.OutputInfo; |
|
2 |
using Parser_1._0.Parsers; |
|
3 |
using System; |
|
2 | 4 |
using System.Collections.Generic; |
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
5 |
using System.Globalization; |
|
6 |
using System.Threading; |
|
6 | 7 |
|
7 | 8 |
namespace Parser_1._0 |
8 | 9 |
{ |
... | ... | |
10 | 11 |
{ |
11 | 12 |
static void Main(string[] args) |
12 | 13 |
{ |
14 |
var cultureInfo = CultureInfo.GetCultureInfo("en-GB"); |
|
15 |
Thread.CurrentThread.CurrentCulture = cultureInfo; |
|
16 |
Thread.CurrentThread.CurrentUICulture = cultureInfo; |
|
13 | 17 |
|
18 |
TagInfo.CreateDictionaries(); |
|
14 | 19 |
|
20 |
string path = "data/weather/"; |
|
21 |
|
|
22 |
WeatherParser parser = new WeatherParser(); |
|
23 |
List<WeatherInfo> list = parser.ParseWeatherData(path); |
|
24 |
if (list == null) |
|
25 |
Console.WriteLine("Unsuccessful parsing"); |
|
26 |
|
|
27 |
Console.WriteLine(list.Count); |
|
28 |
|
|
29 |
for (int i = 0; i < list.Count; i++) |
|
30 |
{ |
|
31 |
Console.WriteLine(list[i].ToString()); |
|
32 |
} |
|
33 |
|
|
34 |
Console.ReadLine(); |
|
15 | 35 |
} |
16 | 36 |
} |
17 | 37 |
} |
Také k dispozici: Unified diff
Parse data as days - averages, sums