示例#1
0
        private async void releases_releasesButton_Click(object sender, EventArgs e)
        {
            Releases api = new Releases {
                ApiKey = apiKey
            };

            if (fredValidationButton.Checked)
            {
                api.Arguments.Validators.Clear();
            }
            ReleasesContainer container = syncButton.Checked ? api.Fetch() : await api.FetchAsync();

            ShowResults(api);
        }
示例#2
0
        /// <summary>
        /// Fetches data from a FRED service endpoint asynchronously.
        /// </summary>
        /// <returns>
        /// A <see cref="ReleasesContainer"/> containing FRED data.
        /// An abnormal fetch returns null and a message is available in the <see cref="FetchMessage"/> property.
        /// </returns>
        public async Task <ReleasesContainer> FetchAsync()
        {
            ReleasesContainer result = await base.FetchAsync <ReleasesContainer>();

            return(result);
        }
示例#3
0
        /// <summary>
        /// Fetches data from a FRED service endpoint.
        /// </summary>
        /// <returns>
        /// A <see cref="ReleasesContainer"/> containing FRED data.
        /// An abnormal fetch returns null and a message is available in the <see cref="FetchMessage"/> property.
        /// </returns>
        public ReleasesContainer Fetch()
        {
            ReleasesContainer result = base.Fetch <ReleasesContainer>();

            return(result);
        }