Пример #1
0
        private void Remove(ICollection podcasts)
        {
            if (podcasts == null)
            {
                throw new ArgumentNullException("podcasts");
            }

            lock (podcasts.SyncRoot)
            {
                foreach (PodcastInfo pi in podcasts)
                {
                    try
                    {
                        RemovePodcast(pi, false);
                    }
                    catch {
                        continue;
                    }
                }

                PodcastDBManager.Delete(podcasts)
                ;
                UpdateCounts();
            }
        }
Пример #2
0
        internal void Delete()
        {
            lock (podcasts.SyncRoot)
            {
                podcasts.Clear();
            }

            PodcastDBManager.Delete(this);
        }
Пример #3
0
        private void RemovePodcast(PodcastInfo pi, bool update)
        {
            if (pi == null)
            {
                throw new ArgumentNullException("pi");
            }

            lock (podcasts.SyncRoot)
            {
                podcasts.Remove(pi);

                if (update)
                {
                    PodcastDBManager.Delete(pi);
                    UpdateCounts();
                }
            }
        }