Esempio n. 1
0
        public bool GoesTo(Station destination)
        {
            bool                found;
            ResolvedStop        to;
            IncludedAssociation association = IncludedAssociation.NoAssociation;
            var departureTime = StopDeparture.Time;

            (found, to) = GoesTo(destination, departureTime);  // Check our service

            if (!found && Service is ResolvedServiceWithAssociations withAssociations)
            {
                (found, to, association) = AssociationGoesTo(destination, departureTime, withAssociations);    // Check associations
            }
            if (found)
            {
                FoundToStop = to;
                Association = association;
            }

            return(found);
        }
Esempio n. 2
0
        public bool ComesFrom(Station origin)
        {
            bool                found;
            ResolvedStop        from;
            IncludedAssociation association = IncludedAssociation.NoAssociation;
            var arrivalTime = StopArrival.Time;

            (found, from) = ComesFrom(origin, arrivalTime);  // Check our service

            if (!found && Service is ResolvedServiceWithAssociations withAssociations)
            {
                (found, from, association) = AssociationComesFrom(origin, arrivalTime, withAssociations);    // Check associations
            }
            if (found)
            {
                FoundFromStop = from;
                Association   = association;
            }

            return(found);
        }