DoWhile<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());
        }
        
public IEnumerable<
IObservable<
TSource>> 
GetSources()
        {
            
yield return this.
_source;
            
while (
this.
_condition()) {
                
yield return this.
_source;
            }
        }
    }
}