/// <summary> /// Handles the <see cref="E:NewsEventComplete" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="T:System.EventArgs" /> instance containing the event data.</param> protected override void OnNewsComplete(object sender, NewsCompleteEventArgs e) { logger.LogInformation("Complete"); logger.LogInformation("Next Scan: {0}", DateTime.Now. AddMinutes(newsConfiguration.Interval).ToLongTimeString()); }
/// <summary> /// Handles the <see cref="E:NewsEventComplete" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="T:System.EventArgs" /> instance containing the event data.</param> protected override void OnNewsSummaryComplete(object sender, NewsCompleteEventArgs e) { logger.LogInformation("Summary Complete {0} stories", e.Stories.Count()); var model = Map.StoryView(e.Stories); if (e.Stories.Count == 0) { return; } // emailService.Send("Crypto News Alert", model.MailMessage()); }
/// <summary> /// Handles the <see cref="E:NewsDetailEventComplete" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="T:Crypto.Compare.Proxies.NewsCompleteEventArgs" /> instance containing the event data.</param> protected override void OnNewsDetailComplete(object sender, NewsCompleteEventArgs e) { logger.LogInformation("Detail Complete"); }