Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>
using System.Collections.Generic;
namespace System.Reactive.Joins
{
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> : Plan<TResult>
{
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Expression { get; }
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> Selector { get; }
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> expression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> selector)
{
Expression = expression;
Selector = selector;
}
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, IObserver<TResult> observer, Action<ActivePlan> deactivate)
{
IObserver<TResult> observer2 = observer;
Action<Exception> onError = observer2.OnError;
JoinObserver<T1> firstJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.First, onError);
JoinObserver<T2> secondJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Second, onError);
JoinObserver<T3> thirdJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Third, onError);
JoinObserver<T4> fourthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Fourth, onError);
JoinObserver<T5> fifthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Fifth, onError);
JoinObserver<T6> sixthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Sixth, onError);
JoinObserver<T7> seventhJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Seventh, onError);
JoinObserver<T8> eighthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Eighth, onError);
JoinObserver<T9> ninthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Ninth, onError);
JoinObserver<T10> tenthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Tenth, onError);
JoinObserver<T11> eleventhJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Eleventh, onError);
JoinObserver<T12> twelfthJoinObserver = Plan<TResult>.CreateObserver(externalSubscriptions, Expression.Twelfth, onError);
ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> activePlan = null;
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, tenthJoinObserver, eleventhJoinObserver, twelfthJoinObserver, delegate(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth, T9 ninth, T10 tenth, T11 eleventh, T12 twelfth) {
TResult value;
try {
value = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth);
} catch (Exception error) {
observer.OnError(error);
return;
}
observer.OnNext(value);
}, delegate {
firstJoinObserver.RemoveActivePlan(activePlan);
secondJoinObserver.RemoveActivePlan(activePlan);
thirdJoinObserver.RemoveActivePlan(activePlan);
fourthJoinObserver.RemoveActivePlan(activePlan);
fifthJoinObserver.RemoveActivePlan(activePlan);
sixthJoinObserver.RemoveActivePlan(activePlan);
seventhJoinObserver.RemoveActivePlan(activePlan);
eighthJoinObserver.RemoveActivePlan(activePlan);
ninthJoinObserver.RemoveActivePlan(activePlan);
tenthJoinObserver.RemoveActivePlan(activePlan);
eleventhJoinObserver.RemoveActivePlan(activePlan);
twelfthJoinObserver.RemoveActivePlan(activePlan);
deactivate(activePlan);
});
firstJoinObserver.AddActivePlan(activePlan);
secondJoinObserver.AddActivePlan(activePlan);
thirdJoinObserver.AddActivePlan(activePlan);
fourthJoinObserver.AddActivePlan(activePlan);
fifthJoinObserver.AddActivePlan(activePlan);
sixthJoinObserver.AddActivePlan(activePlan);
seventhJoinObserver.AddActivePlan(activePlan);
eighthJoinObserver.AddActivePlan(activePlan);
ninthJoinObserver.AddActivePlan(activePlan);
tenthJoinObserver.AddActivePlan(activePlan);
eleventhJoinObserver.AddActivePlan(activePlan);
twelfthJoinObserver.AddActivePlan(activePlan);
return activePlan;
}
}
}