/// <summary>
 /// Initializes a new instance of the <see cref="FeedProcessor" /> class.
 /// </summary>
 /// <param name="feedItemSource">Source for feed items.</param>
 /// <param name="patternSource">Source for patterns used for matching.</param>
 /// <param name="output">Output queue for matches.</param>
 /// <param name="lastItemId">ID of last item processed from the feed.</param>
 public FeedProcessor(
     IFeedItemSource feedItemSource,
     IPatternSource patternSource,
     AsyncCollection <FeedItemMatch> output,
     string lastItemId)
 {
     this.feedItemSource = feedItemSource ?? throw new ArgumentNullException(nameof(feedItemSource));
     this.patternSource  = patternSource ?? throw new ArgumentNullException(nameof(patternSource));
     this.output         = output ?? throw new ArgumentNullException(nameof(output));
     this.LastItemId     = lastItemId;
 }
Esempio n. 2
0
 private void OutputPattern(IPatternSource pattern)
 {
     if ((bool)settings["fullWidth"])
     {
         pg.OutputPattern(pattern.Pattern);
     }
     else
     {
         if ((bool)settings["lowGroup"])
         {
             pg.OutputPattern(pattern.LowHalfPatternAsInt16);
         }
         else
         {
             pg.OutputPattern(pattern.HighHalfPatternAsInt16);
         }
     }
 }
 private void OutputPattern(IPatternSource pattern)
 {
     if ( (bool)settings["fullWidth"] )
     {
         pg.OutputPattern(pattern.Pattern);
     }
     else
     {
         if ( (bool)settings["lowGroup"] )
         {
             pg.OutputPattern(pattern.LowHalfPatternAsInt16);
         }
         else
         {
             pg.OutputPattern(pattern.HighHalfPatternAsInt16);
         }
     }
 }