예제 #1
0
 public Source(string name, string url, int active, int priority, DbBroker db) : this()
 {
     Name     = name;
     Url      = url;
     Active   = active;
     Priority = priority;
     Db       = db;
 }
예제 #2
0
        public List <Story> FetchAllFeeds()
        {
            DbBroker db = new DbBroker();

            Console.WriteLine("Fetching feeds...");
            var          sources           = db.GetActiveSources();
            List <Story> aggregatedStories = new List <Story>();

            foreach (Source s in sources)
            {
                List <Story> stories = s.RetrieveAndPublish();
                aggregatedStories.AddRange(stories);
            }

            return(aggregatedStories);
        }