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