<PackageReference Include="System.Reactive" Version="6.1.0-preview.9" />

DoWhile<TSource>

sealed class DoWhile<TSource> : Producer<TSource, _<TSource>>, IConcatenatable<TSource>
using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Reactive.Linq.ObservableImpl { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1, 1, 1 })] internal sealed class DoWhile<[System.Runtime.CompilerServices.Nullable(2)] TSource> : Producer<TSource, DoWhile<TSource>._>, IConcatenatable<TSource> { [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1 })] internal sealed class _ : ConcatSink<TSource> { public _(IObserver<TSource> observer) : base(observer) { } } private readonly IObservable<TSource> _source; private readonly Func<bool> _condition; public DoWhile(IObservable<TSource> source, Func<bool> condition) { _condition = condition; _source = source; } [return: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] protected override _ CreateSink(IObserver<TSource> observer) { return new _(observer); } protected override void Run([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] _ sink) { sink.Run(GetSources()); } [IteratorStateMachine(typeof(DoWhile<>.<GetSources>d__5))] public IEnumerable<IObservable<TSource>> GetSources() { <GetSources>d__5 <GetSources>d__ = new <GetSources>d__5(-2); <GetSources>d__.<>4__this = this; return <GetSources>d__; } } }