<PackageReference Include="System.Reactive" Version="4.0.0-preview.2.build.379" />

ActivePlan<T1, T2, T3, T4, T5>

class ActivePlan<T1, T2, T3, T4, T5> : ActivePlan
namespace System.Reactive.Joins { internal class ActivePlan<T1, T2, T3, T4, T5> : ActivePlan { private readonly Action<T1, T2, T3, T4, T5> onNext; private readonly Action onCompleted; private readonly JoinObserver<T1> first; private readonly JoinObserver<T2> second; private readonly JoinObserver<T3> third; private readonly JoinObserver<T4> fourth; private readonly JoinObserver<T5> fifth; internal ActivePlan(JoinObserver<T1> first, JoinObserver<T2> second, JoinObserver<T3> third, JoinObserver<T4> fourth, JoinObserver<T5> fifth, Action<T1, T2, T3, T4, T5> onNext, Action onCompleted) { this.onNext = onNext; this.onCompleted = onCompleted; this.first = first; this.second = second; this.third = third; this.fourth = fourth; this.fifth = fifth; AddJoinObserver(first); AddJoinObserver(second); AddJoinObserver(third); AddJoinObserver(fourth); AddJoinObserver(fifth); } internal override void Match() { if (first.Queue.Count > 0 && second.Queue.Count > 0 && third.Queue.Count > 0 && fourth.Queue.Count > 0 && fifth.Queue.Count > 0) { Notification<T1> notification = first.Queue.Peek(); Notification<T2> notification2 = second.Queue.Peek(); Notification<T3> notification3 = third.Queue.Peek(); Notification<T4> notification4 = fourth.Queue.Peek(); Notification<T5> notification5 = fifth.Queue.Peek(); if (notification.Kind == NotificationKind.OnCompleted || notification2.Kind == NotificationKind.OnCompleted || notification3.Kind == NotificationKind.OnCompleted || notification4.Kind == NotificationKind.OnCompleted || notification5.Kind == NotificationKind.OnCompleted) onCompleted(); else { Dequeue(); onNext(notification.Value, notification2.Value, notification3.Value, notification4.Value, notification5.Value); } } } } }