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