Exemple #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;
     }
 }
Exemple #3
0
 public void Put(NewsStory story)
 {
     EnsureChannelExists(story.Tag);
     head.AddStory(story);
 }
Exemple #4
0
 public virtual void AddStory(NewsStory story)
 {
     storyQueue.Enqueue(story);
     OnStoryAdded?.Invoke(story);
 }