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