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