Example #1
0
 protected override IDisposable Run(IObserver <bool> observer, IDisposable cancel, Action <IDisposable> setSink)
 {
     if (_second != null)
     {
         var sink = new _(this, observer, cancel);
         setSink(sink);
         return(sink.Run());
     }
     else
     {
         var sink = new SequenceEqualImpl(this, observer, cancel);
         setSink(sink);
         return(sink.Run());
     }
 }
Example #2
0
 protected override IDisposable Run(IObserver <bool> observer, IDisposable cancel, Action <IDisposable> setSink)
 {
     // 1 branch:  _second != null means that the second sequence is an Observable sequence.
     if (_second != null)
     {
         var sink = new _(this, observer, cancel);
         setSink(sink);
         // Pay attentiont to the change here.
         return(sink.Run());
     }
     // The other is that the second sequence is an Enumerable sequence.
     else
     {
         var sink = new SequenceEqualImpl(this, observer, cancel);
         setSink(sink);
         return(sink.Run());
     }
 }