Пример #1
0
 /// <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;
 }
Пример #2
0
        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);
        }
Пример #3
0
        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;
        }