public static PodcastGroup FromData(IServiceContext serviceContext, PodcastGroupData data) { PodcastGroup group = new PodcastGroup(serviceContext) { Id = data.Id }; group.Podcasts = new ConcurrentObservableCollection <Podcast>(null, true); foreach (RoamingPodcastData podcastData in data.RoamingPodcastsData) { group.Podcasts.Add(Podcast.FromRoamingData(serviceContext, podcastData)); } group.Podcasts.HoldNotifications = false; return(group); }
public PodcastGroupData ToData() { PodcastGroupData data = new PodcastGroupData() { Id = Id }; List <RoamingPodcastData> podcasts = new List <RoamingPodcastData>(); data.RoamingPodcastsData = podcasts; foreach (Podcast podcast in Podcasts) { podcasts.Add(podcast.ToRoamingData()); } return(data); }