using System;

namespace System.Reactive.Joins
{
	public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, T, U, V, W, X, Y, Z> : Pattern
	{
		internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<T> tenth, IObservable<U> eleventh, IObservable<V> twelfth, IObservable<W> thirteenth, IObservable<X> fourteenth, IObservable<Y> fifteenth, IObservable<Z> sixteenth)
		{
			this.First = first;
			this.Second = second;
			this.Third = third;
			this.Fourth = fourth;
			this.Fifth = fifth;
			this.Sixth = sixth;
			this.Seventh = seventh;
			this.Eighth = eighth;
			this.Ninth = ninth;
			this.Tenth = tenth;
			this.Eleventh = eleventh;
			this.Twelfth = twelfth;
			this.Thirteenth = thirteenth;
			this.Fourteenth = fourteenth;
			this.Fifteenth = fifteenth;
			this.Sixteenth = sixteenth;
		}

		internal IObservable<TSource1> First { get; }

		internal IObservable<TSource2> Second { get; }

		internal IObservable<TSource3> Third { get; }

		internal IObservable<TSource4> Fourth { get; }

		internal IObservable<TSource5> Fifth { get; }

		internal IObservable<TSource6> Sixth { get; }

		internal IObservable<TSource7> Seventh { get; }

		internal IObservable<TSource8> Eighth { get; }

		internal IObservable<TSource9> Ninth { get; }

		internal IObservable<T> Tenth { get; }

		internal IObservable<U> Eleventh { get; }

		internal IObservable<V> Twelfth { get; }

		internal IObservable<W> Thirteenth { get; }

		internal IObservable<X> Fourteenth { get; }

		internal IObservable<Y> Fifteenth { get; }

		internal IObservable<Z> Sixteenth { get; }

		public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, T, U, V, W, X, Y, Z, TResult> selector)
		{
			if (selector == null)
			{
				throw new ArgumentNullException("selector");
			}
			return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, T, U, V, W, X, Y, Z, TResult>(this, selector);
		}
	}
}
