public IAsyncEnumerator <TSource> GetAsyncEnumerator() { var en = new SkipUntilEnumerator(_source.GetAsyncEnumerator(), _other.GetAsyncEnumerator()); en.MoveNextOther(); en.MoveNextMain(); return(en); }
public IAsyncEnumerator <TSource> GetAsyncEnumerator(CancellationToken cancellationToken) { var cancelMain = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); var cancelOther = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); var en = new SkipUntilEnumerator(_source.GetAsyncEnumerator(cancelMain.Token), _other.GetAsyncEnumerator(cancelOther.Token), cancelMain, cancelOther); en.MoveNextOther(); en.MoveNextMain(); return(en); }