<PackageReference Include="System.Reactive" Version="6.0.0-preview.9" />
    
    
	
	
		
		
		
	 
	
	
        
                
                ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8>
                
                
                
                
using System.
Runtime.
CompilerServices;
namespace System.
Reactive.
Joins
{
    [
System.
Runtime.
CompilerServices.
NullableContext(
1)]
    [
System.
Runtime.
CompilerServices.
Nullable(
0)]
    
internal sealed class ActivePlan<[
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T1, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T2, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T3, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T4, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T5, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T6, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T7, [
System.
Runtime.
CompilerServices.
Nullable(
2)] 
T8> : 
ActivePlan
    {
        
private readonly Action<
T1, 
T2, 
T3, 
T4, 
T5, 
T6, 
T7, 
T8> 
_onNext;
        
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;
        
private readonly JoinObserver<
T6> 
_sixth;
        
private readonly JoinObserver<
T7> 
_seventh;
        
private readonly JoinObserver<
T8> 
_eighth;
        
internal ActivePlan(
JoinObserver<
T1> 
first, 
JoinObserver<
T2> 
second, 
JoinObserver<
T3> 
third, 
JoinObserver<
T4> 
fourth, 
JoinObserver<
T5> 
fifth, 
JoinObserver<
T6> 
sixth, 
JoinObserver<
T7> 
seventh, 
JoinObserver<
T8> 
eighth, 
Action<
T1, 
T2, 
T3, 
T4, 
T5, 
T6, 
T7, 
T8> 
onNext, 
Action onCompleted)
            : 
base(
onCompleted)
        {
            
_onNext = 
onNext;
            
_first = 
first;
            
_second = 
second;
            
_third = 
third;
            
_fourth = 
fourth;
            
_fifth = 
fifth;
            
_sixth = 
sixth;
            
_seventh = 
seventh;
            
_eighth = 
eighth;
            
AddJoinObserver(
first);
            
AddJoinObserver(
second);
            
AddJoinObserver(
third);
            
AddJoinObserver(
fourth);
            
AddJoinObserver(
fifth);
            
AddJoinObserver(
sixth);
            
AddJoinObserver(
seventh);
            
AddJoinObserver(
eighth);
        }
        
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 && 
_sixth.
Queue.
Count > 
0 && 
_seventh.
Queue.
Count > 
0 && 
_eighth.
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();
                
Notification<
T6> 
notification6 = 
_sixth.
Queue.
Peek();
                
Notification<
T7> 
notification7 = 
_seventh.
Queue.
Peek();
                
Notification<
T8> 
notification8 = 
_eighth.
Queue.
Peek();
                
if (
notification.
Kind == 
NotificationKind.
OnCompleted || 
notification2.
Kind == 
NotificationKind.
OnCompleted || 
notification3.
Kind == 
NotificationKind.
OnCompleted || 
notification4.
Kind == 
NotificationKind.
OnCompleted || 
notification5.
Kind == 
NotificationKind.
OnCompleted || 
notification6.
Kind == 
NotificationKind.
OnCompleted || 
notification7.
Kind == 
NotificationKind.
OnCompleted || 
notification8.
Kind == 
NotificationKind.
OnCompleted)
                    
_onCompleted();
                
else {
                    
Dequeue();
                    
_onNext(
notification.
Value, 
notification2.
Value, 
notification3.
Value, 
notification4.
Value, 
notification5.
Value, 
notification6.
Value, 
notification7.
Value, 
notification8.
Value);
                }
            }
        }
    }
}