internal void SetAssociationStop(ResolvedService service) { var stop = GetStop(service)?.Stop; var associatedServiceStop = GetStop(AssociatedService)?.Stop; Stop = new ResolvedAssociationStop(stop, associatedServiceStop); }
public ResolvedAssociation(Association association, DateTime on, bool isCancelled, ResolvedService associatedService) { Details = association; On = on; IsCancelled = isCancelled; AssociatedService = associatedService; }
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); } }
public ResolvedServiceStop(ResolvedService service, ScheduleLocation stop) { Service = service; Stop = new ResolvedStop(stop, service.On); ViaText = Stop.Stop.Station.GetViaText(Service.Details); }
public ResolvedServiceWithAssociations(ResolvedService service, ResolvedAssociation[] associations) : this(service.Details, service.On, service.IsCancelled, associations) { }