public static void RemoveCategory(Category category)
        {
            var feeds = FeedsController.GetFeeds();

            foreach (var feed in feeds)
            {
                if (feed.Category == category)
                {
                    throw new CategoryInUseExeption();
                }
            }
            Categories.Remove(category);
        }
Example #2
0
        public PersistantFile Read()
        {
            var xmlString = "";
            var reader    = new XMLReader(URL);

            try {
                xmlString = reader.read();
            } catch (FileNotFoundException) {
            }



            var items = new PersistantFile().DeSerialize(xmlString);

            for (int i = 0; i < items.feeds.Count; i++)
            {
                var feed = items.feeds[i];
                FeedsController.UpdateFeedPodcasts(feed);
            }

            return(items);
        }