public void Retry2() { var ex = new InvalidOperationException("Bang!"); var xs = new[] { 1, 2, 3 }.ToAsyncEnumerable().Concat(AsyncEnumerable.Throw<int>(ex)); var res = xs.Retry(); var e = res.GetEnumerator(); HasNext(e, 1); HasNext(e, 2); HasNext(e, 3); HasNext(e, 1); HasNext(e, 2); HasNext(e, 3); HasNext(e, 1); HasNext(e, 2); HasNext(e, 3); }
public void Retry1() { var xs = new[] { 1, 2, 3 }.ToAsyncEnumerable(); var res = xs.Retry(); var e = res.GetEnumerator(); HasNext(e, 1); HasNext(e, 2); HasNext(e, 3); NoNext(e); }