예제 #1
0
        public async Task <List <UpdateChannel> > GetUpdateChannelsAsync()
        {
            List <UpdateChannel> updateChannels = null;

            var now     = DateTime.Now;
            var dateKey = "Channels-" + now.Year + now.Month + now.Day + now.Hour;

            if (WebApiConfig.ChannelCache.ContainsKey(dateKey))
            {
                updateChannels = WebApiConfig.ChannelCache[dateKey];
            }
            else
            {
                updateChannels = await _proPlusDownloader.DownloadReleaseHistoryCabAsync();

                WebApiConfig.ChannelCache[dateKey] = updateChannels;
            }

            return(updateChannels);
        }
예제 #2
0
        public async Task TestProPlusDownloadVersionHistory()
        {
            var proPlusDownloader = new ProPlusDownloader();

            await proPlusDownloader.DownloadReleaseHistoryCabAsync();
        }