Beispiel #1
0
 // Enbart för kloning
 public Feed(string title, FeedCategory myCat, int updateInterval, string url)
 {
     this.FeedTitle      = title;
     this.FeedCategory   = myCat;
     this.FeedItems      = new List <FeedItem>();
     this.UpdateInterval = updateInterval;
     this.Url            = url;
 }
Beispiel #2
0
 public Feed(string title, FeedCategory myCat)
 {
     this.FeedTitle       = title;
     this.FeedCategory    = myCat;
     this.FeedItems       = new List <FeedItem>();
     this.TimeLastChecked = DateTime.Now;
     this.UpdateInterval  = 0;
 }
        public static void InitiateFeedConstruction(string name, FeedCategory category, int timeInterval)
        {
            Feed newFeed = new Feed();

            newFeed.FeedTitle      = name;
            newFeed.FeedCategory   = category;
            newFeed.UpdateInterval = timeInterval;

            Parsing.XmlOperation(newFeed);
        }
Beispiel #4
0
 public static void RemoveCategory(FeedCategory categoryToRemove)
 {
     try {
         CategoryList.Remove(categoryToRemove);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
        public static void InformationHandler(string[] myStringArray)
        {
            string name     = myStringArray[1];
            string cat      = myStringArray[2];
            string interval = myStringArray[3];
            var    category = FeedCategory.CategoryMatcher(cat);

            int intervalInt;

            int.TryParse(interval, out intervalInt);

            InitiateFeedConstruction(name, category, intervalInt);
        }
Beispiel #6
0
        public static FeedCategory CategoryMatcher(string categoryToMatch)
        {
            var myCat = new FeedCategory();

            for (int i = 0; i < CategoryList.Count; i++)
            {
                if (CategoryList[i].CategoryName == categoryToMatch)
                {
                    myCat = CategoryList[i];
                    break;
                }
            }

            return(myCat);
        }