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