Ejemplo n.º 1
0
        /// <summary>
        /// Gets the stories.
        /// </summary>
        /// <param name="web">The web.</param>
        /// <returns>List&lt;Models.Publication&gt;.</returns>
        private List <Publication> GetStories(WebClient web, Func <Publication, bool> filter)
        {
            var stories = GetStories(web).Where(filter).ToList();

            TransformStories(stories, web);

            stories.ForEach(item => OnNewsSummary(this, NewsSummaryEventArgs.Create(item, watch)));
            OnNewsSummaryComplete(this, NewsCompleteEventArgs.Create(stories, watch));
            GetStoryDetails(stories);
            return(stories.OrderByDescending(order => order.publishedOn).ToList());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles the <see cref="E:NewsEvent" /> event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="NewsSummaryEventArgs" /> instance containing the event data.</param>
 protected virtual void OnNewsSummary(object sender, NewsSummaryEventArgs e)
 {
     NewsSummary?.Invoke(sender, e);
 }