DownloadEpisodeAsync() public method

public DownloadEpisodeAsync ( Episode episode ) : System.Threading.Tasks.Task
episode Episode
return System.Threading.Tasks.Task
示例#1
0
        public void TestDownload()
        {
            var localStorage = new LocalPodcastService("podcasts.json");
            var feedParser = new FeedParserService();
            var fileManager = new FileDownloadService();
            var podcastService = new PodcastService(feedParser, localStorage, fileManager);

            var podcastFromService = podcastService.GetPodcastAsync("http://monstercat.com/podcast/feed.xml").Result;
            podcastService.DownloadEpisodeAsync(podcastFromService.Episodes.OrderByDescending(e => e.Published).ToList()[0]).Wait();
        }