Esempio n. 1
0
 public PollingClientRx(
     IPersistStreams persistStreams,
     Int32 waitInterval = 5000)
 {
     if (persistStreams == null)
     {
         throw new ArgumentNullException(nameof(persistStreams));
     }
     if (waitInterval <= 0)
     {
         throw new ArgumentException("Must be greater than 0", nameof(waitInterval));
     }
     _subject        = new Subject <ICommit>();
     _pollingClient2 = new PollingClient2(persistStreams, c =>
     {
         _subject.OnNext(c);
         return(PollingClient2.HandlingResult.MoveToNext);
     },
                                          waitInterval: waitInterval);
 }
 protected override void Context()
 {
     HandleFunction = _ => PollingClient2.HandlingResult.MoveToNext;
     _storeEvents   = Wireup.Init().UsingInMemoryPersistence().Build();
     sut            = new PollingClient2(_storeEvents.Advanced, c => HandleFunction(c), PollingInterval);
 }