C# Класс API.WebClients.GoogleTransitClient

Contains the task for importing Route colors from Google Transit. This task is run once per year(?).
Показать файл Открыть проект Примеры использования класса

Приватные методы

Метод Описание
DoTask ( ) : GoogleTransitData

Downloads and interprets the ZIP file CTS uploads for Google. This is primarily to get route colors and route schedules.

GetC1RSchedule ( ) : GoogleRouteSchedule
GetZipFile ( ) : Stream

Gets the Google Transit Zipfile as a Memory Stream.

ParseRouteCSV ( ZipArchiveEntry entry ) : List

Reads a ZipArchive entry as the routes CSV and extracts the route colors.

ParseScheduleCSV ( ZipArchiveEntry entry ) : List
ReadLines ( StreamReader reader ) : IEnumerable
ToTimeSpan ( string time ) : System.TimeSpan

This gives a time span even if it's over 24 hours-- requires HH:MM or HH:MM:00 format.