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