Esempio n. 1
0
        internal void SetAssociationStop(ResolvedService service)
        {
            var stop = GetStop(service)?.Stop;
            var associatedServiceStop = GetStop(AssociatedService)?.Stop;

            Stop = new ResolvedAssociationStop(stop, associatedServiceStop);
        }
Esempio n. 2
0
 public ResolvedAssociation(Association association, DateTime on, bool isCancelled, ResolvedService associatedService)
 {
     Details           = association;
     On                = on;
     IsCancelled       = isCancelled;
     AssociatedService = associatedService;
 }
Esempio n. 3
0
        internal ResolvedServiceStop GetStop(ResolvedService service)
        {
            try
            {
                var association = IsMain(service.TimetableUid) ?
                                  Details.Main :
                                  Details.Associated;

                var stop = service.GetStop(association.AtLocation, association.Sequence);
                return(stop);
            }
            catch (Exception e)
            {
                var level = IsCancelled ? LogEventLevel.Information : LogEventLevel.Warning;
                Logger.Write(level, e, "Did not find association stop in service {source} : {service}", this, service);
                return(null);
            }
        }
Esempio n. 4
0
 public ResolvedServiceStop(ResolvedService service, ScheduleLocation stop)
 {
     Service = service;
     Stop    = new ResolvedStop(stop, service.On);
     ViaText = Stop.Stop.Station.GetViaText(Service.Details);
 }
Esempio n. 5
0
 public ResolvedServiceWithAssociations(ResolvedService service, ResolvedAssociation[] associations)
     : this(service.Details, service.On, service.IsCancelled, associations)
 {
 }