Example #1
0
 public override void AddStory(NewsStory story)
 {
     foreach (var subQ in _subscriberQueues.Values)
     {
         subQ.AddStory(story);
     }
 }
 public async Task AddStory(NewsStory item)
 {
     try
     {
         await _context.News.InsertOneAsync(item);
     }
     catch (Exception ex)
     {
         // log or manage the exception
         throw ex;
     }
 }
Example #3
0
 public void Put(NewsStory story)
 {
     EnsureChannelExists(story.Tag);
     head.AddStory(story);
 }
Example #4
0
 public virtual void AddStory(NewsStory story)
 {
     storyQueue.Enqueue(story);
     OnStoryAdded?.Invoke(story);
 }