private static List<GoogleRoute> ParseRouteCSV(ZipArchiveEntry entry)
{
var routes = new List<GoogleRoute>();
using (var reader = new StreamReader(entry.Open()))
{
// Ignore the format line
reader.ReadLine();
while (!reader.EndOfStream)
{
var parts = reader.ReadLine().Split(',');
// Ignore all routes which aren't part of CTS and thus don't have any real-time data.
if (parts[0].Contains("ATS") || parts[0].Contains("PC") || parts[0].Contains("LBL"))
{
continue;
}
routes.Add(new GoogleRoute(parts));
}
}
if(!routes.Any(x => x.Name == "C1R"))
{
routes.Add(new GoogleRoute("C1R", "9F8E7D", "http://www.corvallisoregon.gov/index.aspx?page=1774"));
}
return routes;
}