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

BinaryObserver<TLeft, TRight>

sealed class BinaryObserver<TLeft, TRight> : IObserver<Either<Notification<TLeft>, Notification<TRight>>>
using System.Runtime.CompilerServices; namespace System.Reactive { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] internal sealed class BinaryObserver<[System.Runtime.CompilerServices.Nullable(2)] TLeft, [System.Runtime.CompilerServices.Nullable(2)] TRight> : IObserver<Either<Notification<TLeft>, Notification<TRight>>> { public IObserver<TLeft> LeftObserver { get; } public IObserver<TRight> RightObserver { get; } public BinaryObserver(IObserver<TLeft> leftObserver, IObserver<TRight> rightObserver) { LeftObserver = leftObserver; RightObserver = rightObserver; } public BinaryObserver(Action<Notification<TLeft>> left, Action<Notification<TRight>> right) : this(Observer.ToObserver<TLeft>(left), Observer.ToObserver<TRight>(right)) { } void IObserver<Either<Notification<TLeft>, Notification<TRight>>>.OnNext(Either<Notification<TLeft>, Notification<TRight>> value) { value.Switch(delegate(Notification<TLeft> left) { left.Accept(LeftObserver); }, delegate(Notification<TRight> right) { right.Accept(RightObserver); }); } void IObserver<Either<Notification<TLeft>, Notification<TRight>>>.OnError(Exception exception) { } void IObserver<Either<Notification<TLeft>, Notification<TRight>>>.OnCompleted() { } } }