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

AmbManyEnumerable<T>

sealed class AmbManyEnumerable<T> : BasicProducer<T>
using System.Collections.Generic; using System.Linq; using System.Reactive.Disposables; using System.Runtime.CompilerServices; namespace System.Reactive.Linq.ObservableImpl { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1 })] internal sealed class AmbManyEnumerable<[System.Runtime.CompilerServices.Nullable(2)] T> : BasicProducer<T> { private readonly IEnumerable<IObservable<T>> _sources; public AmbManyEnumerable(IEnumerable<IObservable<T>> sources) { _sources = sources; } protected override IDisposable Run(IObserver<T> observer) { IEnumerable<IObservable<T>> sources = _sources; IObservable<T>[] sources2; try { sources2 = Enumerable.ToArray<IObservable<T>>(sources); } catch (Exception error) { observer.OnError(error); return Disposable.Empty; } return AmbCoordinator<T>.Create(observer, sources2); } } }