private async void series_seriesObservationsButton_Click(object sender, EventArgs e) { SeriesObservations api = new SeriesObservations { ApiKey = apiKey }; api.Arguments.series_id = "GNPCA"; if (fredValidationButton.Checked) { api.Arguments.Validators.Clear(); } ObservationContainer container = syncButton.Checked ? api.Fetch() : await api.FetchAsync(); ShowResults(api); }
/// <summary> /// Fetches data from a FRED service endpoint asynchronously. /// </summary> /// <returns> /// A <see cref="ObservationContainer"/> containing FRED data. /// An abnormal fetch returns null and a message is available in the <see cref="FetchMessage"/> property. /// </returns> public async Task <ObservationContainer> FetchAsync() { ObservationContainer result = await base.FetchAsync <ObservationContainer>(); return(result); }
/// <summary> /// Fetches data from a FRED service endpoint. /// </summary> /// <returns> /// A <see cref="ObservationContainer"/> containing FRED data. /// An abnormal fetch returns null and a message is available in the <see cref="FetchMessage"/> property. /// </returns> public ObservationContainer Fetch() { ObservationContainer result = base.Fetch <ObservationContainer>(); return(result); }