/// <summary> /// This makes it look like there is little purpose to this type, /// but it's good to get the semantics clear. ConnexionzPlatform is /// something you've just pulled from Connexionz, /// while BusStop is fully processed and ready to serve to clients. /// </summary> public BusStop(ConnexionzPlatform platform, List <string> routeNames) { ID = platform.PlatformNo; Name = platform.Name; Lat = platform.Lat; Long = platform.Long; RouteNames = routeNames; }
private static bool ShouldAppendDirection(ConnexionzPlatform platform, List <ConnexionzPlatform> platforms) { if (platform.Name == "Downtown Transit Center") { return(false); } bool existsSameNamedStop = platforms.Any(p => p.PlatformNo != platform.PlatformNo && p.Name == platform.Name); return(existsSameNamedStop); }
public BusStop(ConnexionzPlatform platform, List <string> routeNames, bool appendDirection) { ID = platform.PlatformNo; Name = platform.Name + (appendDirection ? " " + ToDirection(platform.BearingToRoad) : string.Empty); Bearing = platform.BearingToRoad; Lat = platform.Lat; Long = platform.Long; RouteNames = routeNames; }