| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
using System.Collections.Generic; |
| 4 |
|
| 5 |
namespace System.Reactive.Joins |
| 6 |
{ |
| 7 |
/// <summary> |
| 8 |
/// Represents an execution plan for join patterns. |
| 9 |
/// </summary> |
| 10 |
/// <typeparam name="TResult">The type of the results produced by the plan.</typeparam> |
| 11 |
public abstract class Plan<TResult> |
| 12 |
{ |
| 13 |
internal Plan() |
| 14 |
{ |
| 15 |
} |
| 16 |
|
| 17 |
internal abstract ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 18 |
IObserver<TResult> observer, Action<ActivePlan> deactivate); |
| 19 |
|
| 20 |
internal static JoinObserver<TSource> CreateObserver<TSource>( |
| 21 |
Dictionary<object, IJoinObserver> externalSubscriptions, IObservable<TSource> observable, Action<Exception> onError) |
| 22 |
{ |
| 23 |
var observer = default(JoinObserver<TSource>); |
| 24 |
var nonGeneric = default(IJoinObserver); |
| 25 |
if (!externalSubscriptions.TryGetValue(observable, out nonGeneric)) |
| 26 |
{ |
| 27 |
observer = new JoinObserver<TSource>(observable, onError); |
| 28 |
externalSubscriptions.Add(observable, observer); |
| 29 |
} |
| 30 |
else |
| 31 |
{ |
| 32 |
observer = (JoinObserver<TSource>) nonGeneric; |
| 33 |
} |
| 34 |
return observer; |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
internal class Plan<T1, TResult> : Plan<TResult> |
| 39 |
{ |
| 40 |
internal Pattern<T1> Expression { get; private set; } |
| 41 |
|
| 42 |
internal Func<T1, TResult> Selector { get; private set; } |
| 43 |
|
| 44 |
internal Plan(Pattern<T1> expression, Func<T1, TResult> selector) |
| 45 |
{ |
| 46 |
Expression = expression; |
| 47 |
Selector = selector; |
| 48 |
} |
| 49 |
|
| 50 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 51 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 52 |
{ |
| 53 |
var onError = new Action<Exception>(observer.OnError); |
| 54 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 55 |
var activePlan = default(ActivePlan<T1>); |
| 56 |
|
| 57 |
activePlan = new ActivePlan<T1>(firstJoinObserver, |
| 58 |
first => |
| 59 |
{ |
| 60 |
var result = default(TResult); |
| 61 |
try |
| 62 |
{ |
| 63 |
result = Selector(first); |
| 64 |
} |
| 65 |
catch (Exception exception) |
| 66 |
{ |
| 67 |
observer.OnError(exception); |
| 68 |
return; |
| 69 |
} |
| 70 |
observer.OnNext(result); |
| 71 |
}, |
| 72 |
() => |
| 73 |
{ |
| 74 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 75 |
deactivate(activePlan); |
| 76 |
}); |
| 77 |
|
| 78 |
firstJoinObserver.AddActivePlan(activePlan); |
| 79 |
return activePlan; |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
internal class Plan<T1, T2, TResult> : Plan<TResult> |
| 84 |
{ |
| 85 |
internal Pattern<T1, T2> Expression { get; private set; } |
| 86 |
|
| 87 |
internal Func<T1, T2, TResult> Selector { get; private set; } |
| 88 |
|
| 89 |
internal Plan(Pattern<T1, T2> expression, Func<T1, T2, TResult> selector) |
| 90 |
{ |
| 91 |
Expression = expression; |
| 92 |
Selector = selector; |
| 93 |
} |
| 94 |
|
| 95 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 96 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 97 |
{ |
| 98 |
var onError = new Action<Exception>(observer.OnError); |
| 99 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 100 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 101 |
var activePlan = default(ActivePlan<T1, T2>); |
| 102 |
|
| 103 |
activePlan = new ActivePlan<T1, T2>(firstJoinObserver, secondJoinObserver, |
| 104 |
(first, second) => |
| 105 |
{ |
| 106 |
var result = default(TResult); |
| 107 |
try |
| 108 |
{ |
| 109 |
result = Selector(first, second); |
| 110 |
} |
| 111 |
catch (Exception exception) |
| 112 |
{ |
| 113 |
observer.OnError(exception); |
| 114 |
return; |
| 115 |
} |
| 116 |
observer.OnNext(result); |
| 117 |
}, |
| 118 |
() => |
| 119 |
{ |
| 120 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 121 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 122 |
deactivate(activePlan); |
| 123 |
}); |
| 124 |
|
| 125 |
firstJoinObserver.AddActivePlan(activePlan); |
| 126 |
secondJoinObserver.AddActivePlan(activePlan); |
| 127 |
return activePlan; |
| 128 |
} |
| 129 |
} |
| 130 |
|
| 131 |
internal class Plan<T1, T2, T3, TResult> : Plan<TResult> |
| 132 |
{ |
| 133 |
internal Pattern<T1, T2, T3> Expression { get; private set; } |
| 134 |
|
| 135 |
internal Func<T1, T2, T3, TResult> Selector { get; private set; } |
| 136 |
|
| 137 |
internal Plan(Pattern<T1, T2, T3> expression, Func<T1, T2, T3, TResult> selector) |
| 138 |
{ |
| 139 |
Expression = expression; |
| 140 |
Selector = selector; |
| 141 |
} |
| 142 |
|
| 143 |
|
| 144 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 145 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 146 |
{ |
| 147 |
var onError = new Action<Exception>(observer.OnError); |
| 148 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 149 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 150 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 151 |
var activePlan = default(ActivePlan<T1, T2, T3>); |
| 152 |
|
| 153 |
activePlan = new ActivePlan<T1, T2, T3>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 154 |
(first, second, third) => |
| 155 |
{ |
| 156 |
var result = default(TResult); |
| 157 |
try |
| 158 |
{ |
| 159 |
result = Selector(first, second, third); |
| 160 |
} |
| 161 |
catch (Exception exception) |
| 162 |
{ |
| 163 |
observer.OnError(exception); |
| 164 |
return; |
| 165 |
} |
| 166 |
observer.OnNext(result); |
| 167 |
}, |
| 168 |
() => |
| 169 |
{ |
| 170 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 171 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 172 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 173 |
deactivate(activePlan); |
| 174 |
}); |
| 175 |
|
| 176 |
firstJoinObserver.AddActivePlan(activePlan); |
| 177 |
secondJoinObserver.AddActivePlan(activePlan); |
| 178 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 179 |
return activePlan; |
| 180 |
} |
| 181 |
} |
| 182 |
|
| 183 |
internal class Plan<T1, T2, T3, T4, TResult> : Plan<TResult> |
| 184 |
{ |
| 185 |
internal Pattern<T1, T2, T3, T4> Expression { get; private set; } |
| 186 |
|
| 187 |
internal Func<T1, T2, T3, T4, TResult> Selector { get; private set; } |
| 188 |
|
| 189 |
internal Plan(Pattern<T1, T2, T3, T4> expression, |
| 190 |
Func<T1, T2, T3, T4, TResult> selector) |
| 191 |
{ |
| 192 |
Expression = expression; |
| 193 |
Selector = selector; |
| 194 |
} |
| 195 |
|
| 196 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 197 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 198 |
{ |
| 199 |
var onError = new Action<Exception>(observer.OnError); |
| 200 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 201 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 202 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 203 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 204 |
var activePlan = default(ActivePlan<T1, T2, T3, T4>); |
| 205 |
|
| 206 |
activePlan = new ActivePlan<T1, T2, T3, T4>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, fourthJoinObserver, |
| 207 |
(first, second, third, fourth) => |
| 208 |
{ |
| 209 |
var result = default(TResult); |
| 210 |
try |
| 211 |
{ |
| 212 |
result = Selector(first, second, third, fourth); |
| 213 |
} |
| 214 |
catch (Exception exception) |
| 215 |
{ |
| 216 |
observer.OnError(exception); |
| 217 |
return; |
| 218 |
} |
| 219 |
observer.OnNext(result); |
| 220 |
}, |
| 221 |
() => |
| 222 |
{ |
| 223 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 224 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 225 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 226 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 227 |
deactivate(activePlan); |
| 228 |
}); |
| 229 |
|
| 230 |
firstJoinObserver.AddActivePlan(activePlan); |
| 231 |
secondJoinObserver.AddActivePlan(activePlan); |
| 232 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 233 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 234 |
return activePlan; |
| 235 |
} |
| 236 |
} |
| 237 |
|
| 238 |
#if !NO_LARGEARITY |
| 239 |
internal class Plan<T1, T2, T3, T4, T5, TResult> : Plan<TResult> |
| 240 |
{ |
| 241 |
internal Pattern<T1, T2, T3, T4, T5> Expression { get; private set; } |
| 242 |
|
| 243 |
internal Func<T1, T2, T3, T4, T5, TResult> Selector { get; private set; } |
| 244 |
|
| 245 |
internal Plan(Pattern<T1, T2, T3, T4, T5> expression, |
| 246 |
Func<T1, T2, T3, T4, T5, TResult> selector) |
| 247 |
{ |
| 248 |
Expression = expression; |
| 249 |
Selector = selector; |
| 250 |
} |
| 251 |
|
| 252 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 253 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 254 |
{ |
| 255 |
var onError = new Action<Exception>(observer.OnError); |
| 256 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 257 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 258 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 259 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 260 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 261 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5>); |
| 262 |
|
| 263 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, fourthJoinObserver, fifthJoinObserver, |
| 264 |
(first, second, third, fourth, fifth) => |
| 265 |
{ |
| 266 |
var result = default(TResult); |
| 267 |
try |
| 268 |
{ |
| 269 |
result = Selector(first, second, third, fourth, fifth); |
| 270 |
} |
| 271 |
catch (Exception exception) |
| 272 |
{ |
| 273 |
observer.OnError(exception); |
| 274 |
return; |
| 275 |
} |
| 276 |
observer.OnNext(result); |
| 277 |
}, |
| 278 |
() => |
| 279 |
{ |
| 280 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 281 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 282 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 283 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 284 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 285 |
deactivate(activePlan); |
| 286 |
}); |
| 287 |
|
| 288 |
firstJoinObserver.AddActivePlan(activePlan); |
| 289 |
secondJoinObserver.AddActivePlan(activePlan); |
| 290 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 291 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 292 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 293 |
return activePlan; |
| 294 |
} |
| 295 |
} |
| 296 |
|
| 297 |
internal class Plan<T1, T2, T3, T4, T5, T6, TResult> : Plan<TResult> |
| 298 |
{ |
| 299 |
internal Pattern<T1, T2, T3, T4, T5, T6> Expression { get; private set; } |
| 300 |
|
| 301 |
internal Func<T1, T2, T3, T4, T5, T6, TResult> Selector { get; private set; } |
| 302 |
|
| 303 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6> expression, |
| 304 |
Func<T1, T2, T3, T4, T5, T6, TResult> selector) |
| 305 |
{ |
| 306 |
Expression = expression; |
| 307 |
Selector = selector; |
| 308 |
} |
| 309 |
|
| 310 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 311 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 312 |
{ |
| 313 |
var onError = new Action<Exception>(observer.OnError); |
| 314 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 315 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 316 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 317 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 318 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 319 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 320 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6>); |
| 321 |
|
| 322 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 323 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, |
| 324 |
(first, second, third, fourth, fifth, sixth) => |
| 325 |
{ |
| 326 |
var result = default(TResult); |
| 327 |
try |
| 328 |
{ |
| 329 |
result = Selector(first, second, third, fourth, fifth, sixth); |
| 330 |
} |
| 331 |
catch (Exception exception) |
| 332 |
{ |
| 333 |
observer.OnError(exception); |
| 334 |
return; |
| 335 |
} |
| 336 |
observer.OnNext(result); |
| 337 |
}, |
| 338 |
() => |
| 339 |
{ |
| 340 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 341 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 342 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 343 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 344 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 345 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 346 |
deactivate(activePlan); |
| 347 |
}); |
| 348 |
|
| 349 |
firstJoinObserver.AddActivePlan(activePlan); |
| 350 |
secondJoinObserver.AddActivePlan(activePlan); |
| 351 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 352 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 353 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 354 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 355 |
return activePlan; |
| 356 |
} |
| 357 |
} |
| 358 |
|
| 359 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, TResult> : Plan<TResult> |
| 360 |
{ |
| 361 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7> Expression { get; private set; } |
| 362 |
|
| 363 |
internal Func<T1, T2, T3, T4, T5, T6, T7, TResult> Selector { get; private set; } |
| 364 |
|
| 365 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7> expression, |
| 366 |
Func<T1, T2, T3, T4, T5, T6, T7, TResult> selector) |
| 367 |
{ |
| 368 |
Expression = expression; |
| 369 |
Selector = selector; |
| 370 |
} |
| 371 |
|
| 372 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 373 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 374 |
{ |
| 375 |
var onError = new Action<Exception>(observer.OnError); |
| 376 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 377 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 378 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 379 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 380 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 381 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 382 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 383 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7>); |
| 384 |
|
| 385 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 386 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, |
| 387 |
(first, second, third, fourth, fifth, sixth, seventh) => |
| 388 |
{ |
| 389 |
var result = default(TResult); |
| 390 |
try |
| 391 |
{ |
| 392 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh); |
| 393 |
} |
| 394 |
catch (Exception exception) |
| 395 |
{ |
| 396 |
observer.OnError(exception); |
| 397 |
return; |
| 398 |
} |
| 399 |
observer.OnNext(result); |
| 400 |
}, |
| 401 |
() => |
| 402 |
{ |
| 403 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 404 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 405 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 406 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 407 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 408 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 409 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 410 |
deactivate(activePlan); |
| 411 |
}); |
| 412 |
|
| 413 |
firstJoinObserver.AddActivePlan(activePlan); |
| 414 |
secondJoinObserver.AddActivePlan(activePlan); |
| 415 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 416 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 417 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 418 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 419 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 420 |
return activePlan; |
| 421 |
} |
| 422 |
} |
| 423 |
|
| 424 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, TResult> : Plan<TResult> |
| 425 |
{ |
| 426 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8> Expression { get; private set; } |
| 427 |
|
| 428 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> Selector { get; private set; } |
| 429 |
|
| 430 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8> expression, |
| 431 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> selector) |
| 432 |
{ |
| 433 |
Expression = expression; |
| 434 |
Selector = selector; |
| 435 |
} |
| 436 |
|
| 437 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 438 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 439 |
{ |
| 440 |
var onError = new Action<Exception>(observer.OnError); |
| 441 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 442 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 443 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 444 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 445 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 446 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 447 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 448 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 449 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8>); |
| 450 |
|
| 451 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 452 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, |
| 453 |
(first, second, third, fourth, fifth, sixth, seventh, eighth) => |
| 454 |
{ |
| 455 |
var result = default(TResult); |
| 456 |
try |
| 457 |
{ |
| 458 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth); |
| 459 |
} |
| 460 |
catch (Exception exception) |
| 461 |
{ |
| 462 |
observer.OnError(exception); |
| 463 |
return; |
| 464 |
} |
| 465 |
observer.OnNext(result); |
| 466 |
}, |
| 467 |
() => |
| 468 |
{ |
| 469 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 470 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 471 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 472 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 473 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 474 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 475 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 476 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 477 |
deactivate(activePlan); |
| 478 |
}); |
| 479 |
|
| 480 |
firstJoinObserver.AddActivePlan(activePlan); |
| 481 |
secondJoinObserver.AddActivePlan(activePlan); |
| 482 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 483 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 484 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 485 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 486 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 487 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 488 |
return activePlan; |
| 489 |
} |
| 490 |
} |
| 491 |
|
| 492 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> : Plan<TResult> |
| 493 |
{ |
| 494 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9> Expression { get; private set; } |
| 495 |
|
| 496 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> Selector { get; private set; } |
| 497 |
|
| 498 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9> expression, |
| 499 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> selector) |
| 500 |
{ |
| 501 |
Expression = expression; |
| 502 |
Selector = selector; |
| 503 |
} |
| 504 |
|
| 505 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 506 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 507 |
{ |
| 508 |
var onError = new Action<Exception>(observer.OnError); |
| 509 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 510 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 511 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 512 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 513 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 514 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 515 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 516 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 517 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 518 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9>); |
| 519 |
|
| 520 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 521 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, |
| 522 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth) => |
| 523 |
{ |
| 524 |
var result = default(TResult); |
| 525 |
try |
| 526 |
{ |
| 527 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth); |
| 528 |
} |
| 529 |
catch (Exception exception) |
| 530 |
{ |
| 531 |
observer.OnError(exception); |
| 532 |
return; |
| 533 |
} |
| 534 |
observer.OnNext(result); |
| 535 |
}, |
| 536 |
() => |
| 537 |
{ |
| 538 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 539 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 540 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 541 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 542 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 543 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 544 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 545 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 546 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 547 |
deactivate(activePlan); |
| 548 |
}); |
| 549 |
|
| 550 |
firstJoinObserver.AddActivePlan(activePlan); |
| 551 |
secondJoinObserver.AddActivePlan(activePlan); |
| 552 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 553 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 554 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 555 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 556 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 557 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 558 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 559 |
return activePlan; |
| 560 |
} |
| 561 |
} |
| 562 |
|
| 563 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> : Plan<TResult> |
| 564 |
{ |
| 565 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Expression { get; private set; } |
| 566 |
|
| 567 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> Selector { get; private set; } |
| 568 |
|
| 569 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> expression, |
| 570 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> selector) |
| 571 |
{ |
| 572 |
Expression = expression; |
| 573 |
Selector = selector; |
| 574 |
} |
| 575 |
|
| 576 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 577 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 578 |
{ |
| 579 |
var onError = new Action<Exception>(observer.OnError); |
| 580 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 581 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 582 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 583 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 584 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 585 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 586 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 587 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 588 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 589 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 590 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>); |
| 591 |
|
| 592 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 593 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, tenthJoinObserver, |
| 594 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth) => |
| 595 |
{ |
| 596 |
var result = default(TResult); |
| 597 |
try |
| 598 |
{ |
| 599 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth); |
| 600 |
} |
| 601 |
catch (Exception exception) |
| 602 |
{ |
| 603 |
observer.OnError(exception); |
| 604 |
return; |
| 605 |
} |
| 606 |
observer.OnNext(result); |
| 607 |
}, |
| 608 |
() => |
| 609 |
{ |
| 610 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 611 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 612 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 613 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 614 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 615 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 616 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 617 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 618 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 619 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 620 |
deactivate(activePlan); |
| 621 |
}); |
| 622 |
|
| 623 |
firstJoinObserver.AddActivePlan(activePlan); |
| 624 |
secondJoinObserver.AddActivePlan(activePlan); |
| 625 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 626 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 627 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 628 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 629 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 630 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 631 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 632 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 633 |
return activePlan; |
| 634 |
} |
| 635 |
} |
| 636 |
|
| 637 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult> : Plan<TResult> |
| 638 |
{ |
| 639 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Expression { get; private set; } |
| 640 |
|
| 641 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult> Selector { get; private set; } |
| 642 |
|
| 643 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> expression, |
| 644 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult> selector) |
| 645 |
{ |
| 646 |
Expression = expression; |
| 647 |
Selector = selector; |
| 648 |
} |
| 649 |
|
| 650 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 651 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 652 |
{ |
| 653 |
var onError = new Action<Exception>(observer.OnError); |
| 654 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 655 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 656 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 657 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 658 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 659 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 660 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 661 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 662 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 663 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 664 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 665 |
|
| 666 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>); |
| 667 |
|
| 668 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 669 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, tenthJoinObserver,eleventhJoinObserver, |
| 670 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh) => |
| 671 |
{ |
| 672 |
var result = default(TResult); |
| 673 |
try |
| 674 |
{ |
| 675 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh); |
| 676 |
} |
| 677 |
catch (Exception exception) |
| 678 |
{ |
| 679 |
observer.OnError(exception); |
| 680 |
return; |
| 681 |
} |
| 682 |
observer.OnNext(result); |
| 683 |
}, |
| 684 |
() => |
| 685 |
{ |
| 686 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 687 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 688 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 689 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 690 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 691 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 692 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 693 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 694 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 695 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 696 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 697 |
deactivate(activePlan); |
| 698 |
}); |
| 699 |
|
| 700 |
firstJoinObserver.AddActivePlan(activePlan); |
| 701 |
secondJoinObserver.AddActivePlan(activePlan); |
| 702 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 703 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 704 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 705 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 706 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 707 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 708 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 709 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 710 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 711 |
return activePlan; |
| 712 |
} |
| 713 |
} |
| 714 |
|
| 715 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> : Plan<TResult> |
| 716 |
{ |
| 717 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Expression { get; private set; } |
| 718 |
|
| 719 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> Selector { get; private set; } |
| 720 |
|
| 721 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> expression, |
| 722 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> selector) |
| 723 |
{ |
| 724 |
Expression = expression; |
| 725 |
Selector = selector; |
| 726 |
} |
| 727 |
|
| 728 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 729 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 730 |
{ |
| 731 |
var onError = new Action<Exception>(observer.OnError); |
| 732 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 733 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 734 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 735 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 736 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 737 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 738 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 739 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 740 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 741 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 742 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 743 |
var twelfthJoinObserver = CreateObserver(externalSubscriptions, Expression.Twelfth, onError); |
| 744 |
|
| 745 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>); |
| 746 |
|
| 747 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 748 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, tenthJoinObserver, eleventhJoinObserver, |
| 749 |
twelfthJoinObserver, |
| 750 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth) => |
| 751 |
{ |
| 752 |
var result = default(TResult); |
| 753 |
try |
| 754 |
{ |
| 755 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth); |
| 756 |
} |
| 757 |
catch (Exception exception) |
| 758 |
{ |
| 759 |
observer.OnError(exception); |
| 760 |
return; |
| 761 |
} |
| 762 |
observer.OnNext(result); |
| 763 |
}, |
| 764 |
() => |
| 765 |
{ |
| 766 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 767 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 768 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 769 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 770 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 771 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 772 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 773 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 774 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 775 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 776 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 777 |
twelfthJoinObserver.RemoveActivePlan(activePlan); |
| 778 |
deactivate(activePlan); |
| 779 |
}); |
| 780 |
|
| 781 |
firstJoinObserver.AddActivePlan(activePlan); |
| 782 |
secondJoinObserver.AddActivePlan(activePlan); |
| 783 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 784 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 785 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 786 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 787 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 788 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 789 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 790 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 791 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 792 |
twelfthJoinObserver.AddActivePlan(activePlan); |
| 793 |
return activePlan; |
| 794 |
} |
| 795 |
} |
| 796 |
|
| 797 |
|
| 798 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> : Plan<TResult> |
| 799 |
{ |
| 800 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Expression { get; private set; } |
| 801 |
|
| 802 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> Selector { get; private set; } |
| 803 |
|
| 804 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> expression, |
| 805 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> selector) |
| 806 |
{ |
| 807 |
Expression = expression; |
| 808 |
Selector = selector; |
| 809 |
} |
| 810 |
|
| 811 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 812 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 813 |
{ |
| 814 |
var onError = new Action<Exception>(observer.OnError); |
| 815 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 816 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 817 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 818 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 819 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 820 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 821 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 822 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 823 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 824 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 825 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 826 |
var twelfthJoinObserver = CreateObserver(externalSubscriptions, Expression.Twelfth, onError); |
| 827 |
var thirteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Thirteenth, onError); |
| 828 |
|
| 829 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>); |
| 830 |
|
| 831 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 832 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, tenthJoinObserver, eleventhJoinObserver, |
| 833 |
twelfthJoinObserver, thirteenthJoinObserver, |
| 834 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth) => |
| 835 |
{ |
| 836 |
var result = default(TResult); |
| 837 |
try |
| 838 |
{ |
| 839 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth); |
| 840 |
} |
| 841 |
catch (Exception exception) |
| 842 |
{ |
| 843 |
observer.OnError(exception); |
| 844 |
return; |
| 845 |
} |
| 846 |
observer.OnNext(result); |
| 847 |
}, |
| 848 |
() => |
| 849 |
{ |
| 850 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 851 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 852 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 853 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 854 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 855 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 856 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 857 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 858 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 859 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 860 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 861 |
twelfthJoinObserver.RemoveActivePlan(activePlan); |
| 862 |
thirteenthJoinObserver.RemoveActivePlan(activePlan); |
| 863 |
deactivate(activePlan); |
| 864 |
}); |
| 865 |
|
| 866 |
firstJoinObserver.AddActivePlan(activePlan); |
| 867 |
secondJoinObserver.AddActivePlan(activePlan); |
| 868 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 869 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 870 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 871 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 872 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 873 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 874 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 875 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 876 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 877 |
twelfthJoinObserver.AddActivePlan(activePlan); |
| 878 |
thirteenthJoinObserver.AddActivePlan(activePlan); |
| 879 |
return activePlan; |
| 880 |
} |
| 881 |
} |
| 882 |
|
| 883 |
|
| 884 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult> : Plan<TResult> |
| 885 |
{ |
| 886 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Expression { get; private set; } |
| 887 |
|
| 888 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult> Selector { get; private set; } |
| 889 |
|
| 890 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> expression, |
| 891 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult> selector) |
| 892 |
{ |
| 893 |
Expression = expression; |
| 894 |
Selector = selector; |
| 895 |
} |
| 896 |
|
| 897 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 898 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 899 |
{ |
| 900 |
var onError = new Action<Exception>(observer.OnError); |
| 901 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 902 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 903 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 904 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 905 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 906 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 907 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 908 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 909 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 910 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 911 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 912 |
var twelfthJoinObserver = CreateObserver(externalSubscriptions, Expression.Twelfth, onError); |
| 913 |
var thirteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Thirteenth, onError); |
| 914 |
var fourteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourteenth, onError); |
| 915 |
|
| 916 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>); |
| 917 |
|
| 918 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>( |
| 919 |
firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 920 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, |
| 921 |
seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, |
| 922 |
tenthJoinObserver, eleventhJoinObserver, |
| 923 |
twelfthJoinObserver, thirteenthJoinObserver, |
| 924 |
fourteenthJoinObserver, |
| 925 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth) => |
| 926 |
{ |
| 927 |
var result = default(TResult); |
| 928 |
try |
| 929 |
{ |
| 930 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth); |
| 931 |
} |
| 932 |
catch (Exception exception) |
| 933 |
{ |
| 934 |
observer.OnError(exception); |
| 935 |
return; |
| 936 |
} |
| 937 |
observer.OnNext(result); |
| 938 |
}, |
| 939 |
() => |
| 940 |
{ |
| 941 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 942 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 943 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 944 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 945 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 946 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 947 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 948 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 949 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 950 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 951 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 952 |
twelfthJoinObserver.RemoveActivePlan(activePlan); |
| 953 |
thirteenthJoinObserver.RemoveActivePlan(activePlan); |
| 954 |
fourteenthJoinObserver.RemoveActivePlan(activePlan); |
| 955 |
deactivate(activePlan); |
| 956 |
}); |
| 957 |
|
| 958 |
firstJoinObserver.AddActivePlan(activePlan); |
| 959 |
secondJoinObserver.AddActivePlan(activePlan); |
| 960 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 961 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 962 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 963 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 964 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 965 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 966 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 967 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 968 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 969 |
twelfthJoinObserver.AddActivePlan(activePlan); |
| 970 |
thirteenthJoinObserver.AddActivePlan(activePlan); |
| 971 |
fourteenthJoinObserver.AddActivePlan(activePlan); |
| 972 |
return activePlan; |
| 973 |
} |
| 974 |
} |
| 975 |
|
| 976 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> : Plan<TResult> |
| 977 |
{ |
| 978 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Expression { get; private set; } |
| 979 |
|
| 980 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> Selector { get; private set; } |
| 981 |
|
| 982 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> expression, |
| 983 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> selector) |
| 984 |
{ |
| 985 |
Expression = expression; |
| 986 |
Selector = selector; |
| 987 |
} |
| 988 |
|
| 989 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 990 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 991 |
{ |
| 992 |
var onError = new Action<Exception>(observer.OnError); |
| 993 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 994 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 995 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 996 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 997 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 998 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 999 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 1000 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 1001 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 1002 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 1003 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 1004 |
var twelfthJoinObserver = CreateObserver(externalSubscriptions, Expression.Twelfth, onError); |
| 1005 |
var thirteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Thirteenth, onError); |
| 1006 |
var fourteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourteenth, onError); |
| 1007 |
var fifteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifteenth, onError); |
| 1008 |
|
| 1009 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>); |
| 1010 |
|
| 1011 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>( |
| 1012 |
firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 1013 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, |
| 1014 |
seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, |
| 1015 |
tenthJoinObserver, eleventhJoinObserver, |
| 1016 |
twelfthJoinObserver, thirteenthJoinObserver, |
| 1017 |
fourteenthJoinObserver, fifteenthJoinObserver, |
| 1018 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth) => |
| 1019 |
{ |
| 1020 |
var result = default(TResult); |
| 1021 |
try |
| 1022 |
{ |
| 1023 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth); |
| 1024 |
} |
| 1025 |
catch (Exception exception) |
| 1026 |
{ |
| 1027 |
observer.OnError(exception); |
| 1028 |
return; |
| 1029 |
} |
| 1030 |
observer.OnNext(result); |
| 1031 |
}, |
| 1032 |
() => |
| 1033 |
{ |
| 1034 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 1035 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 1036 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 1037 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 1038 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 1039 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 1040 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 1041 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 1042 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 1043 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 1044 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 1045 |
twelfthJoinObserver.RemoveActivePlan(activePlan); |
| 1046 |
thirteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1047 |
fourteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1048 |
fifteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1049 |
deactivate(activePlan); |
| 1050 |
}); |
| 1051 |
|
| 1052 |
firstJoinObserver.AddActivePlan(activePlan); |
| 1053 |
secondJoinObserver.AddActivePlan(activePlan); |
| 1054 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 1055 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 1056 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 1057 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 1058 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 1059 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 1060 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 1061 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 1062 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 1063 |
twelfthJoinObserver.AddActivePlan(activePlan); |
| 1064 |
thirteenthJoinObserver.AddActivePlan(activePlan); |
| 1065 |
fourteenthJoinObserver.AddActivePlan(activePlan); |
| 1066 |
fifteenthJoinObserver.AddActivePlan(activePlan); |
| 1067 |
return activePlan; |
| 1068 |
} |
| 1069 |
} |
| 1070 |
internal class Plan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> : Plan<TResult> |
| 1071 |
{ |
| 1072 |
internal Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Expression { get; private set; } |
| 1073 |
|
| 1074 |
internal Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> Selector { get; private set; } |
| 1075 |
|
| 1076 |
internal Plan(Pattern<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> expression, |
| 1077 |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> selector) |
| 1078 |
{ |
| 1079 |
Expression = expression; |
| 1080 |
Selector = selector; |
| 1081 |
} |
| 1082 |
|
| 1083 |
internal override ActivePlan Activate(Dictionary<object, IJoinObserver> externalSubscriptions, |
| 1084 |
IObserver<TResult> observer, Action<ActivePlan> deactivate) |
| 1085 |
{ |
| 1086 |
var onError = new Action<Exception>(observer.OnError); |
| 1087 |
var firstJoinObserver = CreateObserver(externalSubscriptions, Expression.First, onError); |
| 1088 |
var secondJoinObserver = CreateObserver(externalSubscriptions, Expression.Second, onError); |
| 1089 |
var thirdJoinObserver = CreateObserver(externalSubscriptions, Expression.Third, onError); |
| 1090 |
var fourthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourth, onError); |
| 1091 |
var fifthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifth, onError); |
| 1092 |
var sixthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixth, onError); |
| 1093 |
var seventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Seventh, onError); |
| 1094 |
var eighthJoinObserver = CreateObserver(externalSubscriptions, Expression.Eighth, onError); |
| 1095 |
var ninthJoinObserver = CreateObserver(externalSubscriptions, Expression.Ninth, onError); |
| 1096 |
var tenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Tenth, onError); |
| 1097 |
var eleventhJoinObserver = CreateObserver(externalSubscriptions, Expression.Eleventh, onError); |
| 1098 |
var twelfthJoinObserver = CreateObserver(externalSubscriptions, Expression.Twelfth, onError); |
| 1099 |
var thirteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Thirteenth, onError); |
| 1100 |
var fourteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fourteenth, onError); |
| 1101 |
var fifteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Fifteenth, onError); |
| 1102 |
var sixteenthJoinObserver = CreateObserver(externalSubscriptions, Expression.Sixteenth, onError); |
| 1103 |
|
| 1104 |
var activePlan = default(ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>); |
| 1105 |
|
| 1106 |
activePlan = new ActivePlan<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>( |
| 1107 |
firstJoinObserver, secondJoinObserver, thirdJoinObserver, |
| 1108 |
fourthJoinObserver, fifthJoinObserver, sixthJoinObserver, |
| 1109 |
seventhJoinObserver, eighthJoinObserver, ninthJoinObserver, |
| 1110 |
tenthJoinObserver, eleventhJoinObserver, |
| 1111 |
twelfthJoinObserver, thirteenthJoinObserver, |
| 1112 |
fourteenthJoinObserver, fifteenthJoinObserver, |
| 1113 |
sixteenthJoinObserver, |
| 1114 |
(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, sixteenth) => |
| 1115 |
{ |
| 1116 |
var result = default(TResult); |
| 1117 |
try |
| 1118 |
{ |
| 1119 |
result = Selector(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, sixteenth); |
| 1120 |
} |
| 1121 |
catch (Exception exception) |
| 1122 |
{ |
| 1123 |
observer.OnError(exception); |
| 1124 |
return; |
| 1125 |
} |
| 1126 |
observer.OnNext(result); |
| 1127 |
}, |
| 1128 |
() => |
| 1129 |
{ |
| 1130 |
firstJoinObserver.RemoveActivePlan(activePlan); |
| 1131 |
secondJoinObserver.RemoveActivePlan(activePlan); |
| 1132 |
thirdJoinObserver.RemoveActivePlan(activePlan); |
| 1133 |
fourthJoinObserver.RemoveActivePlan(activePlan); |
| 1134 |
fifthJoinObserver.RemoveActivePlan(activePlan); |
| 1135 |
sixthJoinObserver.RemoveActivePlan(activePlan); |
| 1136 |
seventhJoinObserver.RemoveActivePlan(activePlan); |
| 1137 |
eighthJoinObserver.RemoveActivePlan(activePlan); |
| 1138 |
ninthJoinObserver.RemoveActivePlan(activePlan); |
| 1139 |
tenthJoinObserver.RemoveActivePlan(activePlan); |
| 1140 |
eleventhJoinObserver.RemoveActivePlan(activePlan); |
| 1141 |
twelfthJoinObserver.RemoveActivePlan(activePlan); |
| 1142 |
thirteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1143 |
fourteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1144 |
fifteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1145 |
sixteenthJoinObserver.RemoveActivePlan(activePlan); |
| 1146 |
deactivate(activePlan); |
| 1147 |
}); |
| 1148 |
|
| 1149 |
firstJoinObserver.AddActivePlan(activePlan); |
| 1150 |
secondJoinObserver.AddActivePlan(activePlan); |
| 1151 |
thirdJoinObserver.AddActivePlan(activePlan); |
| 1152 |
fourthJoinObserver.AddActivePlan(activePlan); |
| 1153 |
fifthJoinObserver.AddActivePlan(activePlan); |
| 1154 |
sixthJoinObserver.AddActivePlan(activePlan); |
| 1155 |
seventhJoinObserver.AddActivePlan(activePlan); |
| 1156 |
eighthJoinObserver.AddActivePlan(activePlan); |
| 1157 |
ninthJoinObserver.AddActivePlan(activePlan); |
| 1158 |
tenthJoinObserver.AddActivePlan(activePlan); |
| 1159 |
eleventhJoinObserver.AddActivePlan(activePlan); |
| 1160 |
twelfthJoinObserver.AddActivePlan(activePlan); |
| 1161 |
thirteenthJoinObserver.AddActivePlan(activePlan); |
| 1162 |
fourteenthJoinObserver.AddActivePlan(activePlan); |
| 1163 |
fifteenthJoinObserver.AddActivePlan(activePlan); |
| 1164 |
sixteenthJoinObserver.AddActivePlan(activePlan); |
| 1165 |
return activePlan; |
| 1166 |
} |
| 1167 |
} |
| 1168 |
#endif |
| 1169 |
} |