public DetailViewModel( Podcast podcast, Func<Episode, EpisodeViewModel> newEpisodeViewModel) { _podcast = podcast; _newEpisodeViewModel = newEpisodeViewModel; }
private async Task LoadPodcastAsync(Podcast podcast) { ImmutableList<Episode> episodes; episodes = await LoadEpisodesFromCache(podcast.FeedUrl); podcast.SetEpisodes(episodes); episodes = await LoadEpisodesFromServerAsync(podcast.FeedUrl); podcast.SetEpisodes(episodes); await SaveEpisodesToCache(podcast.FeedUrl, episodes); }
public void BeginLoadPodcast(Podcast podcast) { Perform(() => LoadPodcastAsync(podcast)); }
private Podcast CreatePodcast(SearchResult searchResult) { var podcast = new Podcast { Title = searchResult.Title, Subtitle = searchResult.Subtitle, Author = searchResult.Author, FeedUrl = searchResult.FeedUrl, ImageUri = searchResult.ImageUri }; _podcastService.BeginLoadPodcast(podcast); return podcast; }