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