<PackageReference Include="System.Reactive" Version="4.0.0" />

Concat<TSource>

sealed class Concat<TSource> : Producer<TSource, _<TSource>>, IConcatenatable<TSource>
using System.Collections.Generic; namespace System.Reactive.Linq.ObservableImpl { internal sealed class Concat<TSource> : Producer<TSource, Concat<TSource>._>, IConcatenatable<TSource> { internal sealed class _ : ConcatSink<TSource> { public _(IObserver<TSource> observer, IDisposable cancel) : base(observer, cancel) { } public override void OnNext(TSource value) { _observer.OnNext(value); } public override void OnError(Exception error) { _observer.OnError(error); base.Dispose(); } } private readonly IEnumerable<IObservable<TSource>> _sources; public Concat(IEnumerable<IObservable<TSource>> sources) { _sources = sources; } protected override _ CreateSink(IObserver<TSource> observer, IDisposable cancel) { return new _(observer, cancel); } protected override IDisposable Run(_ sink) { return sink.Run(_sources); } public IEnumerable<IObservable<TSource>> GetSources() { return _sources; } } }