public void OnComplete() { if (won) { actual.OnComplete(); } else if (parent.TryWin(index)) { won = true; actual.OnComplete(); } }
public void OnNext(T t) { if (won) { actual.OnNext(t); } else if (parent.TryWin(index)) { won = true; actual.OnNext(t); } else { Cancel(); } }