public GTFS(Agency transitAgency) : base(transitAgency) { db = new DatabaseDataContext(); agency = (from a in db.GTFS_Agencies where a.ID == transitAgency.AgencyID select a).Single(); }
public List<Agency> GetAgencies(string key) { this.ValidateKey(key); DatabaseDataContext db = new DatabaseDataContext(); List<Agency> result = new List<Agency>(); foreach (var r in db.GTFS_Agencies.OrderBy(a => a.Name)) { Agency a = new Agency(); a.AgencyID = r.ID; a.Name = r.Name; a.State = r.State; a.TimeZone = r.TimeZone; result.Add(a); } WebOperationContext.Current.OutgoingResponse.Headers.Add("Access-Control-Allow-Origin", "*"); return result; }
public RouteShout(Agency transitAgency) : base(transitAgency) { this.APIKey = "97027712b04709de2958f77edcc25f1d"; }
public Seattle(Agency transitAgency) : base(transitAgency) { this.APIKey = "0e182a1e-2d1f-49df-b4dd-c3fe09929d98"; }
public WMATA(Agency transitAgency) : base(transitAgency) { this.APIKey = "sr3rfhh9347x4tvgsvaaxakn"; }
protected IWebService(Agency transitAgency) { this.TransitAgency = transitAgency; }
public CTA(Agency transitAgency) : base(transitAgency) { this.APIKey = "jGijvDCQLFimphXidZxyJ8UPL"; }
public CityBus(Agency transitAgency) : base(transitAgency) { }
public BART(Agency transitAgency) : base(transitAgency) { this.APIKey = "ETDH-BAEA-Y9UQ-9TXU"; }
private IWebService SelectWebService(string agencyid) { DatabaseDataContext db = new DatabaseDataContext(); var agency = new Agency((from a in db.GTFS_Agencies where a.ID == agencyid select a).Single()); IWebService webService; switch (agency.AgencyID) { case "bart": webService = new BART(agency); break; case "citybus": webService = new CityBus(agency); break; case "cta": webService = new CTA(agency); break; case "mta": webService = new MTA(agency); break; case "seattle": webService = new Seattle(agency); break; case "wmata": webService = new WMATA(agency); break; default: webService = new GTFS(agency); break; } webService.TransitAgency = agency; return webService; }