Debian Codegraph @

external/rx/Rx/NET/Source/System.Reactive.Providers/Reactive/Joins/QueryablePattern.cs

raw
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
3 #pragma warning disable 1591
4
5 using System.Linq.Expressions;
6 using System.Reactive.Linq;
7
8 namespace System.Reactive.Joins
9 {
10 /// <summary>
11 /// Abstract base class for join patterns represented by an expression tree.
12 /// </summary>
13 public abstract class QueryablePattern
14 {
15 /// <summary>
16 /// Creates a new join pattern object using the specified expression tree represention.
17 /// </summary>
18 /// <param name="expression">Expression tree representing the join pattern.</param>
19 protected QueryablePattern(Expression expression)
20 {
21 Expression = expression;
22 }
23
24 /// <summary>
25 /// Gets the expression tree representing the join pattern.
26 /// </summary>
27 public Expression Expression { get; private set; }
28 }
29
30 /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
31
32 #region Joins auto-generated code (8/4/2012 1:00:32 AM)
33
34 /// <summary>
35 /// Represents a join pattern over two observable sequences.
36 /// </summary>
37 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
38 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
39 public class QueryablePattern<TSource1, TSource2> : QueryablePattern
40 {
41 internal QueryablePattern(Expression expression)
42 : base(expression)
43 {
44 }
45
46 /// <summary>
47 /// Creates a pattern that matches when all three observable sequences have an available element.
48 /// </summary>
49 /// <typeparam name="TSource3">The type of the elements in the third observable sequence.</typeparam>
50 /// <param name="other">Observable sequence to match with the two previous sequences.</param>
51 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
52 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
53 public QueryablePattern<TSource1, TSource2, TSource3> And<TSource3>(IObservable<TSource3> other)
54 {
55 if (other == null)
56 throw new ArgumentNullException("other");
57
58 var t = typeof(QueryablePattern<TSource1, TSource2>);
59 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource3));
60 return new QueryablePattern<TSource1, TSource2, TSource3>(
61 Expression.Call(
62 Expression,
63 m,
64 Qbservable.GetSourceExpression(other)
65 )
66 );
67
68 }
69
70 /// <summary>
71 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
72 /// </summary>
73 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
74 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
75 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
76 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
77 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TResult>> selector)
78 {
79 if (selector == null)
80 throw new ArgumentNullException("selector");
81
82 var t = typeof(QueryablePattern<TSource1, TSource2>);
83 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
84 return new QueryablePlan<TResult>(
85 Expression.Call(
86 Expression,
87 m,
88 selector
89 )
90 );
91
92 }
93
94 }
95
96 /// <summary>
97 /// Represents a join pattern over three observable sequences.
98 /// </summary>
99 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
100 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
101 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
102 public class QueryablePattern<TSource1, TSource2, TSource3> : QueryablePattern
103 {
104 internal QueryablePattern(Expression expression)
105 : base(expression)
106 {
107 }
108
109 /// <summary>
110 /// Creates a pattern that matches when all four observable sequences have an available element.
111 /// </summary>
112 /// <typeparam name="TSource4">The type of the elements in the fourth observable sequence.</typeparam>
113 /// <param name="other">Observable sequence to match with the three previous sequences.</param>
114 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
115 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
116 public QueryablePattern<TSource1, TSource2, TSource3, TSource4> And<TSource4>(IObservable<TSource4> other)
117 {
118 if (other == null)
119 throw new ArgumentNullException("other");
120
121 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3>);
122 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource4));
123 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4>(
124 Expression.Call(
125 Expression,
126 m,
127 Qbservable.GetSourceExpression(other)
128 )
129 );
130
131 }
132
133 /// <summary>
134 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
135 /// </summary>
136 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
137 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
138 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
139 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
140 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TResult>> selector)
141 {
142 if (selector == null)
143 throw new ArgumentNullException("selector");
144
145 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3>);
146 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
147 return new QueryablePlan<TResult>(
148 Expression.Call(
149 Expression,
150 m,
151 selector
152 )
153 );
154
155 }
156
157 }
158
159 /// <summary>
160 /// Represents a join pattern over four observable sequences.
161 /// </summary>
162 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
163 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
164 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
165 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
166 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4> : QueryablePattern
167 {
168 internal QueryablePattern(Expression expression)
169 : base(expression)
170 {
171 }
172
173 #if !NO_LARGEARITY
174 /// <summary>
175 /// Creates a pattern that matches when all five observable sequences have an available element.
176 /// </summary>
177 /// <typeparam name="TSource5">The type of the elements in the fifth observable sequence.</typeparam>
178 /// <param name="other">Observable sequence to match with the four previous sequences.</param>
179 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
180 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
181 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5> And<TSource5>(IObservable<TSource5> other)
182 {
183 if (other == null)
184 throw new ArgumentNullException("other");
185
186 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4>);
187 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource5));
188 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5>(
189 Expression.Call(
190 Expression,
191 m,
192 Qbservable.GetSourceExpression(other)
193 )
194 );
195
196 }
197 #endif
198
199 /// <summary>
200 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
201 /// </summary>
202 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
203 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
204 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
205 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
206 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TResult>> selector)
207 {
208 if (selector == null)
209 throw new ArgumentNullException("selector");
210
211 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4>);
212 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
213 return new QueryablePlan<TResult>(
214 Expression.Call(
215 Expression,
216 m,
217 selector
218 )
219 );
220
221 }
222
223 }
224
225 #if !NO_LARGEARITY
226 /// <summary>
227 /// Represents a join pattern over five observable sequences.
228 /// </summary>
229 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
230 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
231 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
232 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
233 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
234 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5> : QueryablePattern
235 {
236 internal QueryablePattern(Expression expression)
237 : base(expression)
238 {
239 }
240
241 /// <summary>
242 /// Creates a pattern that matches when all six observable sequences have an available element.
243 /// </summary>
244 /// <typeparam name="TSource6">The type of the elements in the sixth observable sequence.</typeparam>
245 /// <param name="other">Observable sequence to match with the five previous sequences.</param>
246 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
247 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
248 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6> And<TSource6>(IObservable<TSource6> other)
249 {
250 if (other == null)
251 throw new ArgumentNullException("other");
252
253 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5>);
254 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource6));
255 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6>(
256 Expression.Call(
257 Expression,
258 m,
259 Qbservable.GetSourceExpression(other)
260 )
261 );
262
263 }
264
265 /// <summary>
266 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
267 /// </summary>
268 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
269 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
270 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
271 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
272 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>> selector)
273 {
274 if (selector == null)
275 throw new ArgumentNullException("selector");
276
277 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5>);
278 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
279 return new QueryablePlan<TResult>(
280 Expression.Call(
281 Expression,
282 m,
283 selector
284 )
285 );
286
287 }
288
289 }
290
291 /// <summary>
292 /// Represents a join pattern over six observable sequences.
293 /// </summary>
294 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
295 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
296 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
297 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
298 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
299 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
300 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6> : QueryablePattern
301 {
302 internal QueryablePattern(Expression expression)
303 : base(expression)
304 {
305 }
306
307 /// <summary>
308 /// Creates a pattern that matches when all seven observable sequences have an available element.
309 /// </summary>
310 /// <typeparam name="TSource7">The type of the elements in the seventh observable sequence.</typeparam>
311 /// <param name="other">Observable sequence to match with the six previous sequences.</param>
312 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
313 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
314 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7> And<TSource7>(IObservable<TSource7> other)
315 {
316 if (other == null)
317 throw new ArgumentNullException("other");
318
319 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6>);
320 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource7));
321 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7>(
322 Expression.Call(
323 Expression,
324 m,
325 Qbservable.GetSourceExpression(other)
326 )
327 );
328
329 }
330
331 /// <summary>
332 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
333 /// </summary>
334 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
335 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
336 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
337 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
338 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>> selector)
339 {
340 if (selector == null)
341 throw new ArgumentNullException("selector");
342
343 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6>);
344 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
345 return new QueryablePlan<TResult>(
346 Expression.Call(
347 Expression,
348 m,
349 selector
350 )
351 );
352
353 }
354
355 }
356
357 /// <summary>
358 /// Represents a join pattern over seven observable sequences.
359 /// </summary>
360 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
361 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
362 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
363 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
364 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
365 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
366 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
367 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7> : QueryablePattern
368 {
369 internal QueryablePattern(Expression expression)
370 : base(expression)
371 {
372 }
373
374 /// <summary>
375 /// Creates a pattern that matches when all eight observable sequences have an available element.
376 /// </summary>
377 /// <typeparam name="TSource8">The type of the elements in the eighth observable sequence.</typeparam>
378 /// <param name="other">Observable sequence to match with the seven previous sequences.</param>
379 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
380 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
381 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8> And<TSource8>(IObservable<TSource8> other)
382 {
383 if (other == null)
384 throw new ArgumentNullException("other");
385
386 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7>);
387 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource8));
388 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8>(
389 Expression.Call(
390 Expression,
391 m,
392 Qbservable.GetSourceExpression(other)
393 )
394 );
395
396 }
397
398 /// <summary>
399 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
400 /// </summary>
401 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
402 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
403 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
404 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
405 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>> selector)
406 {
407 if (selector == null)
408 throw new ArgumentNullException("selector");
409
410 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7>);
411 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
412 return new QueryablePlan<TResult>(
413 Expression.Call(
414 Expression,
415 m,
416 selector
417 )
418 );
419
420 }
421
422 }
423
424 /// <summary>
425 /// Represents a join pattern over eight observable sequences.
426 /// </summary>
427 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
428 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
429 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
430 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
431 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
432 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
433 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
434 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
435 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8> : QueryablePattern
436 {
437 internal QueryablePattern(Expression expression)
438 : base(expression)
439 {
440 }
441
442 /// <summary>
443 /// Creates a pattern that matches when all nine observable sequences have an available element.
444 /// </summary>
445 /// <typeparam name="TSource9">The type of the elements in the ninth observable sequence.</typeparam>
446 /// <param name="other">Observable sequence to match with the eight previous sequences.</param>
447 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
448 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
449 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9> And<TSource9>(IObservable<TSource9> other)
450 {
451 if (other == null)
452 throw new ArgumentNullException("other");
453
454 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8>);
455 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource9));
456 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9>(
457 Expression.Call(
458 Expression,
459 m,
460 Qbservable.GetSourceExpression(other)
461 )
462 );
463
464 }
465
466 /// <summary>
467 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
468 /// </summary>
469 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
470 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
471 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
472 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
473 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>> selector)
474 {
475 if (selector == null)
476 throw new ArgumentNullException("selector");
477
478 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8>);
479 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
480 return new QueryablePlan<TResult>(
481 Expression.Call(
482 Expression,
483 m,
484 selector
485 )
486 );
487
488 }
489
490 }
491
492 /// <summary>
493 /// Represents a join pattern over nine observable sequences.
494 /// </summary>
495 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
496 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
497 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
498 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
499 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
500 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
501 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
502 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
503 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
504 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9> : QueryablePattern
505 {
506 internal QueryablePattern(Expression expression)
507 : base(expression)
508 {
509 }
510
511 /// <summary>
512 /// Creates a pattern that matches when all ten observable sequences have an available element.
513 /// </summary>
514 /// <typeparam name="TSource10">The type of the elements in the tenth observable sequence.</typeparam>
515 /// <param name="other">Observable sequence to match with the nine previous sequences.</param>
516 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
517 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
518 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10> And<TSource10>(IObservable<TSource10> other)
519 {
520 if (other == null)
521 throw new ArgumentNullException("other");
522
523 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9>);
524 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource10));
525 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10>(
526 Expression.Call(
527 Expression,
528 m,
529 Qbservable.GetSourceExpression(other)
530 )
531 );
532
533 }
534
535 /// <summary>
536 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
537 /// </summary>
538 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
539 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
540 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
541 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
542 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>> selector)
543 {
544 if (selector == null)
545 throw new ArgumentNullException("selector");
546
547 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9>);
548 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
549 return new QueryablePlan<TResult>(
550 Expression.Call(
551 Expression,
552 m,
553 selector
554 )
555 );
556
557 }
558
559 }
560
561 /// <summary>
562 /// Represents a join pattern over ten observable sequences.
563 /// </summary>
564 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
565 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
566 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
567 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
568 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
569 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
570 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
571 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
572 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
573 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
574 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10> : QueryablePattern
575 {
576 internal QueryablePattern(Expression expression)
577 : base(expression)
578 {
579 }
580
581 /// <summary>
582 /// Creates a pattern that matches when all eleven observable sequences have an available element.
583 /// </summary>
584 /// <typeparam name="TSource11">The type of the elements in the eleventh observable sequence.</typeparam>
585 /// <param name="other">Observable sequence to match with the ten previous sequences.</param>
586 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
587 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
588 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11> And<TSource11>(IObservable<TSource11> other)
589 {
590 if (other == null)
591 throw new ArgumentNullException("other");
592
593 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10>);
594 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource11));
595 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11>(
596 Expression.Call(
597 Expression,
598 m,
599 Qbservable.GetSourceExpression(other)
600 )
601 );
602
603 }
604
605 /// <summary>
606 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
607 /// </summary>
608 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
609 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
610 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
611 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
612 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>> selector)
613 {
614 if (selector == null)
615 throw new ArgumentNullException("selector");
616
617 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10>);
618 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
619 return new QueryablePlan<TResult>(
620 Expression.Call(
621 Expression,
622 m,
623 selector
624 )
625 );
626
627 }
628
629 }
630
631 /// <summary>
632 /// Represents a join pattern over eleven observable sequences.
633 /// </summary>
634 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
635 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
636 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
637 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
638 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
639 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
640 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
641 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
642 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
643 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
644 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
645 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11> : QueryablePattern
646 {
647 internal QueryablePattern(Expression expression)
648 : base(expression)
649 {
650 }
651
652 /// <summary>
653 /// Creates a pattern that matches when all twelve observable sequences have an available element.
654 /// </summary>
655 /// <typeparam name="TSource12">The type of the elements in the twelfth observable sequence.</typeparam>
656 /// <param name="other">Observable sequence to match with the eleven previous sequences.</param>
657 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
658 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
659 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12> And<TSource12>(IObservable<TSource12> other)
660 {
661 if (other == null)
662 throw new ArgumentNullException("other");
663
664 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11>);
665 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource12));
666 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12>(
667 Expression.Call(
668 Expression,
669 m,
670 Qbservable.GetSourceExpression(other)
671 )
672 );
673
674 }
675
676 /// <summary>
677 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
678 /// </summary>
679 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
680 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
681 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
682 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
683 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>> selector)
684 {
685 if (selector == null)
686 throw new ArgumentNullException("selector");
687
688 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11>);
689 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
690 return new QueryablePlan<TResult>(
691 Expression.Call(
692 Expression,
693 m,
694 selector
695 )
696 );
697
698 }
699
700 }
701
702 /// <summary>
703 /// Represents a join pattern over twelve observable sequences.
704 /// </summary>
705 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
706 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
707 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
708 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
709 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
710 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
711 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
712 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
713 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
714 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
715 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
716 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
717 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12> : QueryablePattern
718 {
719 internal QueryablePattern(Expression expression)
720 : base(expression)
721 {
722 }
723
724 /// <summary>
725 /// Creates a pattern that matches when all thirteen observable sequences have an available element.
726 /// </summary>
727 /// <typeparam name="TSource13">The type of the elements in the thirteenth observable sequence.</typeparam>
728 /// <param name="other">Observable sequence to match with the twelve previous sequences.</param>
729 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
730 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
731 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13> And<TSource13>(IObservable<TSource13> other)
732 {
733 if (other == null)
734 throw new ArgumentNullException("other");
735
736 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12>);
737 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource13));
738 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13>(
739 Expression.Call(
740 Expression,
741 m,
742 Qbservable.GetSourceExpression(other)
743 )
744 );
745
746 }
747
748 /// <summary>
749 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
750 /// </summary>
751 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
752 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
753 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
754 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
755 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>> selector)
756 {
757 if (selector == null)
758 throw new ArgumentNullException("selector");
759
760 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12>);
761 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
762 return new QueryablePlan<TResult>(
763 Expression.Call(
764 Expression,
765 m,
766 selector
767 )
768 );
769
770 }
771
772 }
773
774 /// <summary>
775 /// Represents a join pattern over thirteen observable sequences.
776 /// </summary>
777 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
778 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
779 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
780 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
781 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
782 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
783 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
784 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
785 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
786 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
787 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
788 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
789 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
790 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13> : QueryablePattern
791 {
792 internal QueryablePattern(Expression expression)
793 : base(expression)
794 {
795 }
796
797 /// <summary>
798 /// Creates a pattern that matches when all fourteen observable sequences have an available element.
799 /// </summary>
800 /// <typeparam name="TSource14">The type of the elements in the fourteenth observable sequence.</typeparam>
801 /// <param name="other">Observable sequence to match with the thirteen previous sequences.</param>
802 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
803 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
804 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14> And<TSource14>(IObservable<TSource14> other)
805 {
806 if (other == null)
807 throw new ArgumentNullException("other");
808
809 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13>);
810 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource14));
811 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14>(
812 Expression.Call(
813 Expression,
814 m,
815 Qbservable.GetSourceExpression(other)
816 )
817 );
818
819 }
820
821 /// <summary>
822 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
823 /// </summary>
824 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
825 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
826 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
827 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
828 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>> selector)
829 {
830 if (selector == null)
831 throw new ArgumentNullException("selector");
832
833 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13>);
834 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
835 return new QueryablePlan<TResult>(
836 Expression.Call(
837 Expression,
838 m,
839 selector
840 )
841 );
842
843 }
844
845 }
846
847 /// <summary>
848 /// Represents a join pattern over fourteen observable sequences.
849 /// </summary>
850 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
851 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
852 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
853 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
854 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
855 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
856 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
857 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
858 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
859 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
860 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
861 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
862 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
863 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
864 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14> : QueryablePattern
865 {
866 internal QueryablePattern(Expression expression)
867 : base(expression)
868 {
869 }
870
871 /// <summary>
872 /// Creates a pattern that matches when all fifteen observable sequences have an available element.
873 /// </summary>
874 /// <typeparam name="TSource15">The type of the elements in the fifteenth observable sequence.</typeparam>
875 /// <param name="other">Observable sequence to match with the fourteen previous sequences.</param>
876 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
877 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
878 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15> And<TSource15>(IObservable<TSource15> other)
879 {
880 if (other == null)
881 throw new ArgumentNullException("other");
882
883 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14>);
884 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource15));
885 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15>(
886 Expression.Call(
887 Expression,
888 m,
889 Qbservable.GetSourceExpression(other)
890 )
891 );
892
893 }
894
895 /// <summary>
896 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
897 /// </summary>
898 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
899 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
900 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
901 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
902 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>> selector)
903 {
904 if (selector == null)
905 throw new ArgumentNullException("selector");
906
907 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14>);
908 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
909 return new QueryablePlan<TResult>(
910 Expression.Call(
911 Expression,
912 m,
913 selector
914 )
915 );
916
917 }
918
919 }
920
921 /// <summary>
922 /// Represents a join pattern over fifteen observable sequences.
923 /// </summary>
924 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
925 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
926 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
927 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
928 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
929 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
930 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
931 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
932 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
933 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
934 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
935 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
936 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
937 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
938 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
939 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15> : QueryablePattern
940 {
941 internal QueryablePattern(Expression expression)
942 : base(expression)
943 {
944 }
945
946 /// <summary>
947 /// Creates a pattern that matches when all sixteen observable sequences have an available element.
948 /// </summary>
949 /// <typeparam name="TSource16">The type of the elements in the sixteenth observable sequence.</typeparam>
950 /// <param name="other">Observable sequence to match with the fifteen previous sequences.</param>
951 /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
952 /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
953 public QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16> And<TSource16>(IObservable<TSource16> other)
954 {
955 if (other == null)
956 throw new ArgumentNullException("other");
957
958 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15>);
959 var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource16));
960 return new QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16>(
961 Expression.Call(
962 Expression,
963 m,
964 Qbservable.GetSourceExpression(other)
965 )
966 );
967
968 }
969
970 /// <summary>
971 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
972 /// </summary>
973 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
974 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
975 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
976 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
977 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>> selector)
978 {
979 if (selector == null)
980 throw new ArgumentNullException("selector");
981
982 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15>);
983 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
984 return new QueryablePlan<TResult>(
985 Expression.Call(
986 Expression,
987 m,
988 selector
989 )
990 );
991
992 }
993
994 }
995
996 /// <summary>
997 /// Represents a join pattern over sixteen observable sequences.
998 /// </summary>
999 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1000 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1001 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1002 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1003 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1004 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1005 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1006 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1007 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
1008 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
1009 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
1010 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
1011 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
1012 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
1013 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
1014 /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
1015 public class QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16> : QueryablePattern
1016 {
1017 internal QueryablePattern(Expression expression)
1018 : base(expression)
1019 {
1020 }
1021
1022 /// <summary>
1023 /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
1024 /// </summary>
1025 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1026 /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
1027 /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
1028 /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
1029 public QueryablePlan<TResult> Then<TResult>(Expression<Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>> selector)
1030 {
1031 if (selector == null)
1032 throw new ArgumentNullException("selector");
1033
1034 var t = typeof(QueryablePattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16>);
1035 var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult));
1036 return new QueryablePlan<TResult>(
1037 Expression.Call(
1038 Expression,
1039 m,
1040 selector
1041 )
1042 );
1043
1044 }
1045
1046 }
1047
1048 #endif
1049
1050 #endregion
1051 }
1052
1053 #pragma warning restore 1591