Esempio n. 1
0
        public static async Task <double> GetCpiData()
        {
            var setting    = new CpiDataSetting();
            var downloader = new CpiDataDownloader(setting);
            var result     = await downloader.DownloadObjectTaskAsync().ConfigureAwait(false);

            var cpi = result.CurentCpi;

            return(cpi);
        }
Esempio n. 2
0
        public async Task CpiDownloaderTest()
        {
            var setting    = new CpiDataSetting();
            var downloader = new CpiDataDownloader(setting);
            var result     = await downloader.DownloadObjectTaskAsync().ConfigureAwait(false);

            foreach (var item in result.Items)
            {
                PrintProperties(item, 0);
            }
        }