Ejemplo n.º 1
0
 public static async Task <Tuple <TransitAgency[], DataRetrievalMessage> > GetTransitAgencies(DataRetrievalOptions options, CancellationToken cancellationToken)
 {
     return(await CloudOrLocal(() => ApiLayer.GetTransitAgencies(cancellationToken), () => FileManager.GetAgenciesFromCache(), options, typeof(OperationCanceledException)));
 }
Ejemplo n.º 2
0
 public static async Task <TransitAgency?> GetTransitAgency(string id, CancellationToken cancellationToken)
 {
     return((await ApiLayer.GetTransitAgencies(cancellationToken)).First(agency => agency.ID == id));
 }