Debian Codegraph @

external/rx/Rx/NET/Source/System.Reactive.Linq/Reactive/Linq/Observable.Multiple.cs

raw
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 using System.Reactive.Concurrency;
5
6 #if !NO_TPL
7 using System.Threading; // Used in XML doc comments
8 using System.Threading.Tasks;
9 #endif
10
11 namespace System.Reactive.Linq
12 {
13 public static partial class Observable
14 {
15 #region + Amb +
16
17 /// <summary>
18 /// Propagates the observable sequence that reacts first.
19 /// </summary>
20 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
21 /// <param name="first">First observable sequence.</param>
22 /// <param name="second">Second observable sequence.</param>
23 /// <returns>An observable sequence that surfaces either of the given sequences, whichever reacted first.</returns>
24 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
25 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
26 public static IObservable<TSource> Amb<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
27 {
28 if (first == null)
29 throw new ArgumentNullException("first");
30 if (second == null)
31 throw new ArgumentNullException("second");
32
33 return s_impl.Amb<TSource>(first, second);
34 }
35
36 /// <summary>
37 /// Propagates the observable sequence that reacts first.
38 /// </summary>
39 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
40 /// <param name="sources">Observable sources competing to react first.</param>
41 /// <returns>An observable sequence that surfaces any of the given sequences, whichever reacted first.</returns>
42 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
43 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
44 public static IObservable<TSource> Amb<TSource>(params IObservable<TSource>[] sources)
45 {
46 if (sources == null)
47 throw new ArgumentNullException("sources");
48
49 return s_impl.Amb<TSource>(sources);
50 }
51
52 /// <summary>
53 /// Propagates the observable sequence that reacts first.
54 /// </summary>
55 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
56 /// <param name="sources">Observable sources competing to react first.</param>
57 /// <returns>An observable sequence that surfaces any of the given sequences, whichever reacted first.</returns>
58 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
59 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
60 public static IObservable<TSource> Amb<TSource>(this IEnumerable<IObservable<TSource>> sources)
61 {
62 if (sources == null)
63 throw new ArgumentNullException("sources");
64
65 return s_impl.Amb<TSource>(sources);
66 }
67
68 #endregion
69
70 #region + Buffer +
71
72 /// <summary>
73 /// Projects each element of an observable sequence into consecutive non-overlapping buffers.
74 /// </summary>
75 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
76 /// <typeparam name="TBufferClosing">The type of the elements in the sequences indicating buffer closing events.</typeparam>
77 /// <param name="source">Source sequence to produce buffers over.</param>
78 /// <param name="bufferClosingSelector">A function invoked to define the boundaries of the produced buffers. A new buffer is started when the previous one is closed.</param>
79 /// <returns>An observable sequence of buffers.</returns>
80 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferClosingSelector"/> is null.</exception>
81 public static IObservable<IList<TSource>> Buffer<TSource, TBufferClosing>(this IObservable<TSource> source, Func<IObservable<TBufferClosing>> bufferClosingSelector)
82 {
83 if (source == null)
84 throw new ArgumentNullException("source");
85 if (bufferClosingSelector == null)
86 throw new ArgumentNullException("bufferClosingSelector");
87
88 return s_impl.Buffer<TSource, TBufferClosing>(source, bufferClosingSelector);
89 }
90
91 /// <summary>
92 /// Projects each element of an observable sequence into zero or more buffers.
93 /// </summary>
94 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
95 /// <typeparam name="TBufferOpening">The type of the elements in the sequence indicating buffer opening events, also passed to the closing selector to obtain a sequence of buffer closing events.</typeparam>
96 /// <typeparam name="TBufferClosing">The type of the elements in the sequences indicating buffer closing events.</typeparam>
97 /// <param name="source">Source sequence to produce buffers over.</param>
98 /// <param name="bufferOpenings">Observable sequence whose elements denote the creation of new buffers.</param>
99 /// <param name="bufferClosingSelector">A function invoked to define the closing of each produced buffer.</param>
100 /// <returns>An observable sequence of buffers.</returns>
101 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferOpenings"/> or <paramref name="bufferClosingSelector"/> is null.</exception>
102 public static IObservable<IList<TSource>> Buffer<TSource, TBufferOpening, TBufferClosing>(this IObservable<TSource> source, IObservable<TBufferOpening> bufferOpenings, Func<TBufferOpening, IObservable<TBufferClosing>> bufferClosingSelector)
103 {
104 if (source == null)
105 throw new ArgumentNullException("source");
106 if (bufferOpenings == null)
107 throw new ArgumentNullException("bufferOpenings");
108 if (bufferClosingSelector == null)
109 throw new ArgumentNullException("bufferClosingSelector");
110
111 return s_impl.Buffer<TSource, TBufferOpening, TBufferClosing>(source, bufferOpenings, bufferClosingSelector);
112 }
113
114 /// <summary>
115 /// Projects each element of an observable sequence into consecutive non-overlapping buffers.
116 /// </summary>
117 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
118 /// <typeparam name="TBufferBoundary">The type of the elements in the sequences indicating buffer boundary events.</typeparam>
119 /// <param name="source">Source sequence to produce buffers over.</param>
120 /// <param name="bufferBoundaries">Sequence of buffer boundary markers. The current buffer is closed and a new buffer is opened upon receiving a boundary marker.</param>
121 /// <returns>An observable sequence of buffers.</returns>
122 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferBoundaries"/> is null.</exception>
123 public static IObservable<IList<TSource>> Buffer<TSource, TBufferBoundary>(this IObservable<TSource> source, IObservable<TBufferBoundary> bufferBoundaries)
124 {
125 if (source == null)
126 throw new ArgumentNullException("source");
127 if (bufferBoundaries == null)
128 throw new ArgumentNullException("bufferBoundaries");
129
130 return s_impl.Buffer<TSource, TBufferBoundary>(source, bufferBoundaries);
131 }
132
133 #endregion
134
135 #region + Catch +
136
137 /// <summary>
138 /// Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler.
139 /// </summary>
140 /// <typeparam name="TSource">The type of the elements in the source sequence and sequences returned by the exception handler function.</typeparam>
141 /// <typeparam name="TException">The type of the exception to catch and handle. Needs to derive from <see cref="System.Exception"/>.</typeparam>
142 /// <param name="source">Source sequence.</param>
143 /// <param name="handler">Exception handler function, producing another observable sequence.</param>
144 /// <returns>An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an exception occurred.</returns>
145 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="handler"/> is null.</exception>
146 public static IObservable<TSource> Catch<TSource, TException>(this IObservable<TSource> source, Func<TException, IObservable<TSource>> handler) where TException : Exception
147 {
148 if (source == null)
149 throw new ArgumentNullException("source");
150 if (handler == null)
151 throw new ArgumentNullException("handler");
152
153 return s_impl.Catch<TSource, TException>(source, handler);
154 }
155
156 /// <summary>
157 /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
158 /// </summary>
159 /// <typeparam name="TSource">The type of the elements in the source sequence and handler sequence.</typeparam>
160 /// <param name="first">First observable sequence whose exception (if any) is caught.</param>
161 /// <param name="second">Second observable sequence used to produce results when an error occurred in the first sequence.</param>
162 /// <returns>An observable sequence containing the first sequence's elements, followed by the elements of the second sequence in case an exception occurred.</returns>
163 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
164 public static IObservable<TSource> Catch<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
165 {
166 if (first == null)
167 throw new ArgumentNullException("first");
168 if (second == null)
169 throw new ArgumentNullException("second");
170
171 return s_impl.Catch<TSource>(first, second);
172 }
173
174 /// <summary>
175 /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
176 /// </summary>
177 /// <typeparam name="TSource">The type of the elements in the source and handler sequences.</typeparam>
178 /// <param name="sources">Observable sequences to catch exceptions for.</param>
179 /// <returns>An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.</returns>
180 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
181 public static IObservable<TSource> Catch<TSource>(params IObservable<TSource>[] sources)
182 {
183 if (sources == null)
184 throw new ArgumentNullException("sources");
185
186 return s_impl.Catch<TSource>(sources);
187 }
188
189 /// <summary>
190 /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
191 /// </summary>
192 /// <typeparam name="TSource">The type of the elements in the source and handler sequences.</typeparam>
193 /// <param name="sources">Observable sequences to catch exceptions for.</param>
194 /// <returns>An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.</returns>
195 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
196 public static IObservable<TSource> Catch<TSource>(this IEnumerable<IObservable<TSource>> sources)
197 {
198 if (sources == null)
199 throw new ArgumentNullException("sources");
200
201 return s_impl.Catch<TSource>(sources);
202 }
203
204 #endregion
205
206 #region + CombineLatest +
207
208 /// <summary>
209 /// Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element.
210 /// </summary>
211 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
212 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
213 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
214 /// <param name="first">First observable source.</param>
215 /// <param name="second">Second observable source.</param>
216 /// <param name="resultSelector">Function to invoke whenever either of the sources produces an element.</param>
217 /// <returns>An observable sequence containing the result of combining elements of both sources using the specified result selector function.</returns>
218 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
219 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
220 {
221 if (first == null)
222 throw new ArgumentNullException("first");
223 if (second == null)
224 throw new ArgumentNullException("second");
225 if (resultSelector == null)
226 throw new ArgumentNullException("resultSelector");
227
228 return s_impl.CombineLatest<TSource1, TSource2, TResult>(first, second, resultSelector);
229 }
230
231 #if !NO_PERF
232
233 /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
234
235 #region CombineLatest auto-generated code (8/3/2012 6:37:08 PM)
236
237 /// <summary>
238 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
239 /// </summary>
240 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
241 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
242 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
243 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
244 /// <param name="source1">First observable source.</param>
245 /// <param name="source2">Second observable source.</param>
246 /// <param name="source3">Third observable source.</param>
247 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
248 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
249 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="resultSelector"/> is null.</exception>
250 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, Func<TSource1, TSource2, TSource3, TResult> resultSelector)
251 {
252 if (source1 == null)
253 throw new ArgumentNullException("source1");
254 if (source2 == null)
255 throw new ArgumentNullException("source2");
256 if (source3 == null)
257 throw new ArgumentNullException("source3");
258 if (resultSelector == null)
259 throw new ArgumentNullException("resultSelector");
260
261 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TResult>(source1, source2, source3, resultSelector);
262 }
263
264 /// <summary>
265 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
266 /// </summary>
267 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
268 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
269 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
270 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
271 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
272 /// <param name="source1">First observable source.</param>
273 /// <param name="source2">Second observable source.</param>
274 /// <param name="source3">Third observable source.</param>
275 /// <param name="source4">Fourth observable source.</param>
276 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
277 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
278 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="resultSelector"/> is null.</exception>
279 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, Func<TSource1, TSource2, TSource3, TSource4, TResult> resultSelector)
280 {
281 if (source1 == null)
282 throw new ArgumentNullException("source1");
283 if (source2 == null)
284 throw new ArgumentNullException("source2");
285 if (source3 == null)
286 throw new ArgumentNullException("source3");
287 if (source4 == null)
288 throw new ArgumentNullException("source4");
289 if (resultSelector == null)
290 throw new ArgumentNullException("resultSelector");
291
292 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TResult>(source1, source2, source3, source4, resultSelector);
293 }
294
295 #if !NO_LARGEARITY
296 /// <summary>
297 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
298 /// </summary>
299 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
300 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
301 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
302 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
303 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
304 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
305 /// <param name="source1">First observable source.</param>
306 /// <param name="source2">Second observable source.</param>
307 /// <param name="source3">Third observable source.</param>
308 /// <param name="source4">Fourth observable source.</param>
309 /// <param name="source5">Fifth observable source.</param>
310 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
311 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
312 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="resultSelector"/> is null.</exception>
313 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult> resultSelector)
314 {
315 if (source1 == null)
316 throw new ArgumentNullException("source1");
317 if (source2 == null)
318 throw new ArgumentNullException("source2");
319 if (source3 == null)
320 throw new ArgumentNullException("source3");
321 if (source4 == null)
322 throw new ArgumentNullException("source4");
323 if (source5 == null)
324 throw new ArgumentNullException("source5");
325 if (resultSelector == null)
326 throw new ArgumentNullException("resultSelector");
327
328 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(source1, source2, source3, source4, source5, resultSelector);
329 }
330
331 /// <summary>
332 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
333 /// </summary>
334 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
335 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
336 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
337 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
338 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
339 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
340 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
341 /// <param name="source1">First observable source.</param>
342 /// <param name="source2">Second observable source.</param>
343 /// <param name="source3">Third observable source.</param>
344 /// <param name="source4">Fourth observable source.</param>
345 /// <param name="source5">Fifth observable source.</param>
346 /// <param name="source6">Sixth observable source.</param>
347 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
348 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
349 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="resultSelector"/> is null.</exception>
350 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult> resultSelector)
351 {
352 if (source1 == null)
353 throw new ArgumentNullException("source1");
354 if (source2 == null)
355 throw new ArgumentNullException("source2");
356 if (source3 == null)
357 throw new ArgumentNullException("source3");
358 if (source4 == null)
359 throw new ArgumentNullException("source4");
360 if (source5 == null)
361 throw new ArgumentNullException("source5");
362 if (source6 == null)
363 throw new ArgumentNullException("source6");
364 if (resultSelector == null)
365 throw new ArgumentNullException("resultSelector");
366
367 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(source1, source2, source3, source4, source5, source6, resultSelector);
368 }
369
370 /// <summary>
371 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
372 /// </summary>
373 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
374 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
375 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
376 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
377 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
378 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
379 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
380 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
381 /// <param name="source1">First observable source.</param>
382 /// <param name="source2">Second observable source.</param>
383 /// <param name="source3">Third observable source.</param>
384 /// <param name="source4">Fourth observable source.</param>
385 /// <param name="source5">Fifth observable source.</param>
386 /// <param name="source6">Sixth observable source.</param>
387 /// <param name="source7">Seventh observable source.</param>
388 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
389 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
390 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="resultSelector"/> is null.</exception>
391 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult> resultSelector)
392 {
393 if (source1 == null)
394 throw new ArgumentNullException("source1");
395 if (source2 == null)
396 throw new ArgumentNullException("source2");
397 if (source3 == null)
398 throw new ArgumentNullException("source3");
399 if (source4 == null)
400 throw new ArgumentNullException("source4");
401 if (source5 == null)
402 throw new ArgumentNullException("source5");
403 if (source6 == null)
404 throw new ArgumentNullException("source6");
405 if (source7 == null)
406 throw new ArgumentNullException("source7");
407 if (resultSelector == null)
408 throw new ArgumentNullException("resultSelector");
409
410 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(source1, source2, source3, source4, source5, source6, source7, resultSelector);
411 }
412
413 /// <summary>
414 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
415 /// </summary>
416 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
417 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
418 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
419 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
420 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
421 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
422 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
423 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
424 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
425 /// <param name="source1">First observable source.</param>
426 /// <param name="source2">Second observable source.</param>
427 /// <param name="source3">Third observable source.</param>
428 /// <param name="source4">Fourth observable source.</param>
429 /// <param name="source5">Fifth observable source.</param>
430 /// <param name="source6">Sixth observable source.</param>
431 /// <param name="source7">Seventh observable source.</param>
432 /// <param name="source8">Eighth observable source.</param>
433 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
434 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
435 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="resultSelector"/> is null.</exception>
436 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult> resultSelector)
437 {
438 if (source1 == null)
439 throw new ArgumentNullException("source1");
440 if (source2 == null)
441 throw new ArgumentNullException("source2");
442 if (source3 == null)
443 throw new ArgumentNullException("source3");
444 if (source4 == null)
445 throw new ArgumentNullException("source4");
446 if (source5 == null)
447 throw new ArgumentNullException("source5");
448 if (source6 == null)
449 throw new ArgumentNullException("source6");
450 if (source7 == null)
451 throw new ArgumentNullException("source7");
452 if (source8 == null)
453 throw new ArgumentNullException("source8");
454 if (resultSelector == null)
455 throw new ArgumentNullException("resultSelector");
456
457 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector);
458 }
459
460 /// <summary>
461 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
462 /// </summary>
463 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
464 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
465 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
466 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
467 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
468 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
469 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
470 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
471 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
472 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
473 /// <param name="source1">First observable source.</param>
474 /// <param name="source2">Second observable source.</param>
475 /// <param name="source3">Third observable source.</param>
476 /// <param name="source4">Fourth observable source.</param>
477 /// <param name="source5">Fifth observable source.</param>
478 /// <param name="source6">Sixth observable source.</param>
479 /// <param name="source7">Seventh observable source.</param>
480 /// <param name="source8">Eighth observable source.</param>
481 /// <param name="source9">Ninth observable source.</param>
482 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
483 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
484 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="resultSelector"/> is null.</exception>
485 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult> resultSelector)
486 {
487 if (source1 == null)
488 throw new ArgumentNullException("source1");
489 if (source2 == null)
490 throw new ArgumentNullException("source2");
491 if (source3 == null)
492 throw new ArgumentNullException("source3");
493 if (source4 == null)
494 throw new ArgumentNullException("source4");
495 if (source5 == null)
496 throw new ArgumentNullException("source5");
497 if (source6 == null)
498 throw new ArgumentNullException("source6");
499 if (source7 == null)
500 throw new ArgumentNullException("source7");
501 if (source8 == null)
502 throw new ArgumentNullException("source8");
503 if (source9 == null)
504 throw new ArgumentNullException("source9");
505 if (resultSelector == null)
506 throw new ArgumentNullException("resultSelector");
507
508 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector);
509 }
510
511 /// <summary>
512 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
513 /// </summary>
514 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
515 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
516 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
517 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
518 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
519 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
520 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
521 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
522 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
523 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
524 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
525 /// <param name="source1">First observable source.</param>
526 /// <param name="source2">Second observable source.</param>
527 /// <param name="source3">Third observable source.</param>
528 /// <param name="source4">Fourth observable source.</param>
529 /// <param name="source5">Fifth observable source.</param>
530 /// <param name="source6">Sixth observable source.</param>
531 /// <param name="source7">Seventh observable source.</param>
532 /// <param name="source8">Eighth observable source.</param>
533 /// <param name="source9">Ninth observable source.</param>
534 /// <param name="source10">Tenth observable source.</param>
535 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
536 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
537 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="resultSelector"/> is null.</exception>
538 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult> resultSelector)
539 {
540 if (source1 == null)
541 throw new ArgumentNullException("source1");
542 if (source2 == null)
543 throw new ArgumentNullException("source2");
544 if (source3 == null)
545 throw new ArgumentNullException("source3");
546 if (source4 == null)
547 throw new ArgumentNullException("source4");
548 if (source5 == null)
549 throw new ArgumentNullException("source5");
550 if (source6 == null)
551 throw new ArgumentNullException("source6");
552 if (source7 == null)
553 throw new ArgumentNullException("source7");
554 if (source8 == null)
555 throw new ArgumentNullException("source8");
556 if (source9 == null)
557 throw new ArgumentNullException("source9");
558 if (source10 == null)
559 throw new ArgumentNullException("source10");
560 if (resultSelector == null)
561 throw new ArgumentNullException("resultSelector");
562
563 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector);
564 }
565
566 /// <summary>
567 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
568 /// </summary>
569 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
570 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
571 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
572 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
573 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
574 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
575 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
576 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
577 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
578 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
579 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
580 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
581 /// <param name="source1">First observable source.</param>
582 /// <param name="source2">Second observable source.</param>
583 /// <param name="source3">Third observable source.</param>
584 /// <param name="source4">Fourth observable source.</param>
585 /// <param name="source5">Fifth observable source.</param>
586 /// <param name="source6">Sixth observable source.</param>
587 /// <param name="source7">Seventh observable source.</param>
588 /// <param name="source8">Eighth observable source.</param>
589 /// <param name="source9">Ninth observable source.</param>
590 /// <param name="source10">Tenth observable source.</param>
591 /// <param name="source11">Eleventh observable source.</param>
592 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
593 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
594 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="resultSelector"/> is null.</exception>
595 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult> resultSelector)
596 {
597 if (source1 == null)
598 throw new ArgumentNullException("source1");
599 if (source2 == null)
600 throw new ArgumentNullException("source2");
601 if (source3 == null)
602 throw new ArgumentNullException("source3");
603 if (source4 == null)
604 throw new ArgumentNullException("source4");
605 if (source5 == null)
606 throw new ArgumentNullException("source5");
607 if (source6 == null)
608 throw new ArgumentNullException("source6");
609 if (source7 == null)
610 throw new ArgumentNullException("source7");
611 if (source8 == null)
612 throw new ArgumentNullException("source8");
613 if (source9 == null)
614 throw new ArgumentNullException("source9");
615 if (source10 == null)
616 throw new ArgumentNullException("source10");
617 if (source11 == null)
618 throw new ArgumentNullException("source11");
619 if (resultSelector == null)
620 throw new ArgumentNullException("resultSelector");
621
622 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector);
623 }
624
625 /// <summary>
626 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
627 /// </summary>
628 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
629 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
630 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
631 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
632 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
633 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
634 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
635 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
636 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
637 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
638 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
639 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
640 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
641 /// <param name="source1">First observable source.</param>
642 /// <param name="source2">Second observable source.</param>
643 /// <param name="source3">Third observable source.</param>
644 /// <param name="source4">Fourth observable source.</param>
645 /// <param name="source5">Fifth observable source.</param>
646 /// <param name="source6">Sixth observable source.</param>
647 /// <param name="source7">Seventh observable source.</param>
648 /// <param name="source8">Eighth observable source.</param>
649 /// <param name="source9">Ninth observable source.</param>
650 /// <param name="source10">Tenth observable source.</param>
651 /// <param name="source11">Eleventh observable source.</param>
652 /// <param name="source12">Twelfth observable source.</param>
653 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
654 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
655 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="resultSelector"/> is null.</exception>
656 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult> resultSelector)
657 {
658 if (source1 == null)
659 throw new ArgumentNullException("source1");
660 if (source2 == null)
661 throw new ArgumentNullException("source2");
662 if (source3 == null)
663 throw new ArgumentNullException("source3");
664 if (source4 == null)
665 throw new ArgumentNullException("source4");
666 if (source5 == null)
667 throw new ArgumentNullException("source5");
668 if (source6 == null)
669 throw new ArgumentNullException("source6");
670 if (source7 == null)
671 throw new ArgumentNullException("source7");
672 if (source8 == null)
673 throw new ArgumentNullException("source8");
674 if (source9 == null)
675 throw new ArgumentNullException("source9");
676 if (source10 == null)
677 throw new ArgumentNullException("source10");
678 if (source11 == null)
679 throw new ArgumentNullException("source11");
680 if (source12 == null)
681 throw new ArgumentNullException("source12");
682 if (resultSelector == null)
683 throw new ArgumentNullException("resultSelector");
684
685 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector);
686 }
687
688 /// <summary>
689 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
690 /// </summary>
691 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
692 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
693 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
694 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
695 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
696 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
697 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
698 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
699 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
700 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
701 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
702 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
703 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
704 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
705 /// <param name="source1">First observable source.</param>
706 /// <param name="source2">Second observable source.</param>
707 /// <param name="source3">Third observable source.</param>
708 /// <param name="source4">Fourth observable source.</param>
709 /// <param name="source5">Fifth observable source.</param>
710 /// <param name="source6">Sixth observable source.</param>
711 /// <param name="source7">Seventh observable source.</param>
712 /// <param name="source8">Eighth observable source.</param>
713 /// <param name="source9">Ninth observable source.</param>
714 /// <param name="source10">Tenth observable source.</param>
715 /// <param name="source11">Eleventh observable source.</param>
716 /// <param name="source12">Twelfth observable source.</param>
717 /// <param name="source13">Thirteenth observable source.</param>
718 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
719 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
720 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="resultSelector"/> is null.</exception>
721 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult> resultSelector)
722 {
723 if (source1 == null)
724 throw new ArgumentNullException("source1");
725 if (source2 == null)
726 throw new ArgumentNullException("source2");
727 if (source3 == null)
728 throw new ArgumentNullException("source3");
729 if (source4 == null)
730 throw new ArgumentNullException("source4");
731 if (source5 == null)
732 throw new ArgumentNullException("source5");
733 if (source6 == null)
734 throw new ArgumentNullException("source6");
735 if (source7 == null)
736 throw new ArgumentNullException("source7");
737 if (source8 == null)
738 throw new ArgumentNullException("source8");
739 if (source9 == null)
740 throw new ArgumentNullException("source9");
741 if (source10 == null)
742 throw new ArgumentNullException("source10");
743 if (source11 == null)
744 throw new ArgumentNullException("source11");
745 if (source12 == null)
746 throw new ArgumentNullException("source12");
747 if (source13 == null)
748 throw new ArgumentNullException("source13");
749 if (resultSelector == null)
750 throw new ArgumentNullException("resultSelector");
751
752 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector);
753 }
754
755 /// <summary>
756 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
757 /// </summary>
758 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
759 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
760 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
761 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
762 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
763 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
764 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
765 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
766 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
767 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
768 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
769 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
770 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
771 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
772 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
773 /// <param name="source1">First observable source.</param>
774 /// <param name="source2">Second observable source.</param>
775 /// <param name="source3">Third observable source.</param>
776 /// <param name="source4">Fourth observable source.</param>
777 /// <param name="source5">Fifth observable source.</param>
778 /// <param name="source6">Sixth observable source.</param>
779 /// <param name="source7">Seventh observable source.</param>
780 /// <param name="source8">Eighth observable source.</param>
781 /// <param name="source9">Ninth observable source.</param>
782 /// <param name="source10">Tenth observable source.</param>
783 /// <param name="source11">Eleventh observable source.</param>
784 /// <param name="source12">Twelfth observable source.</param>
785 /// <param name="source13">Thirteenth observable source.</param>
786 /// <param name="source14">Fourteenth observable source.</param>
787 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
788 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
789 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="resultSelector"/> is null.</exception>
790 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult> resultSelector)
791 {
792 if (source1 == null)
793 throw new ArgumentNullException("source1");
794 if (source2 == null)
795 throw new ArgumentNullException("source2");
796 if (source3 == null)
797 throw new ArgumentNullException("source3");
798 if (source4 == null)
799 throw new ArgumentNullException("source4");
800 if (source5 == null)
801 throw new ArgumentNullException("source5");
802 if (source6 == null)
803 throw new ArgumentNullException("source6");
804 if (source7 == null)
805 throw new ArgumentNullException("source7");
806 if (source8 == null)
807 throw new ArgumentNullException("source8");
808 if (source9 == null)
809 throw new ArgumentNullException("source9");
810 if (source10 == null)
811 throw new ArgumentNullException("source10");
812 if (source11 == null)
813 throw new ArgumentNullException("source11");
814 if (source12 == null)
815 throw new ArgumentNullException("source12");
816 if (source13 == null)
817 throw new ArgumentNullException("source13");
818 if (source14 == null)
819 throw new ArgumentNullException("source14");
820 if (resultSelector == null)
821 throw new ArgumentNullException("resultSelector");
822
823 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector);
824 }
825
826 /// <summary>
827 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
828 /// </summary>
829 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
830 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
831 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
832 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
833 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
834 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
835 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
836 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
837 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
838 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
839 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
840 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
841 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
842 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
843 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
844 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
845 /// <param name="source1">First observable source.</param>
846 /// <param name="source2">Second observable source.</param>
847 /// <param name="source3">Third observable source.</param>
848 /// <param name="source4">Fourth observable source.</param>
849 /// <param name="source5">Fifth observable source.</param>
850 /// <param name="source6">Sixth observable source.</param>
851 /// <param name="source7">Seventh observable source.</param>
852 /// <param name="source8">Eighth observable source.</param>
853 /// <param name="source9">Ninth observable source.</param>
854 /// <param name="source10">Tenth observable source.</param>
855 /// <param name="source11">Eleventh observable source.</param>
856 /// <param name="source12">Twelfth observable source.</param>
857 /// <param name="source13">Thirteenth observable source.</param>
858 /// <param name="source14">Fourteenth observable source.</param>
859 /// <param name="source15">Fifteenth observable source.</param>
860 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
861 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
862 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="resultSelector"/> is null.</exception>
863 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> resultSelector)
864 {
865 if (source1 == null)
866 throw new ArgumentNullException("source1");
867 if (source2 == null)
868 throw new ArgumentNullException("source2");
869 if (source3 == null)
870 throw new ArgumentNullException("source3");
871 if (source4 == null)
872 throw new ArgumentNullException("source4");
873 if (source5 == null)
874 throw new ArgumentNullException("source5");
875 if (source6 == null)
876 throw new ArgumentNullException("source6");
877 if (source7 == null)
878 throw new ArgumentNullException("source7");
879 if (source8 == null)
880 throw new ArgumentNullException("source8");
881 if (source9 == null)
882 throw new ArgumentNullException("source9");
883 if (source10 == null)
884 throw new ArgumentNullException("source10");
885 if (source11 == null)
886 throw new ArgumentNullException("source11");
887 if (source12 == null)
888 throw new ArgumentNullException("source12");
889 if (source13 == null)
890 throw new ArgumentNullException("source13");
891 if (source14 == null)
892 throw new ArgumentNullException("source14");
893 if (source15 == null)
894 throw new ArgumentNullException("source15");
895 if (resultSelector == null)
896 throw new ArgumentNullException("resultSelector");
897
898 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector);
899 }
900
901 /// <summary>
902 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
903 /// </summary>
904 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
905 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
906 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
907 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
908 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
909 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
910 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
911 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
912 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
913 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
914 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
915 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
916 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
917 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
918 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
919 /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
920 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
921 /// <param name="source1">First observable source.</param>
922 /// <param name="source2">Second observable source.</param>
923 /// <param name="source3">Third observable source.</param>
924 /// <param name="source4">Fourth observable source.</param>
925 /// <param name="source5">Fifth observable source.</param>
926 /// <param name="source6">Sixth observable source.</param>
927 /// <param name="source7">Seventh observable source.</param>
928 /// <param name="source8">Eighth observable source.</param>
929 /// <param name="source9">Ninth observable source.</param>
930 /// <param name="source10">Tenth observable source.</param>
931 /// <param name="source11">Eleventh observable source.</param>
932 /// <param name="source12">Twelfth observable source.</param>
933 /// <param name="source13">Thirteenth observable source.</param>
934 /// <param name="source14">Fourteenth observable source.</param>
935 /// <param name="source15">Fifteenth observable source.</param>
936 /// <param name="source16">Sixteenth observable source.</param>
937 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
938 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
939 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="source16"/> or <paramref name="resultSelector"/> is null.</exception>
940 public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, IObservable<TSource16> source16, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult> resultSelector)
941 {
942 if (source1 == null)
943 throw new ArgumentNullException("source1");
944 if (source2 == null)
945 throw new ArgumentNullException("source2");
946 if (source3 == null)
947 throw new ArgumentNullException("source3");
948 if (source4 == null)
949 throw new ArgumentNullException("source4");
950 if (source5 == null)
951 throw new ArgumentNullException("source5");
952 if (source6 == null)
953 throw new ArgumentNullException("source6");
954 if (source7 == null)
955 throw new ArgumentNullException("source7");
956 if (source8 == null)
957 throw new ArgumentNullException("source8");
958 if (source9 == null)
959 throw new ArgumentNullException("source9");
960 if (source10 == null)
961 throw new ArgumentNullException("source10");
962 if (source11 == null)
963 throw new ArgumentNullException("source11");
964 if (source12 == null)
965 throw new ArgumentNullException("source12");
966 if (source13 == null)
967 throw new ArgumentNullException("source13");
968 if (source14 == null)
969 throw new ArgumentNullException("source14");
970 if (source15 == null)
971 throw new ArgumentNullException("source15");
972 if (source16 == null)
973 throw new ArgumentNullException("source16");
974 if (resultSelector == null)
975 throw new ArgumentNullException("resultSelector");
976
977 return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector);
978 }
979
980 #endif
981
982 #endregion
983
984 #endif
985
986 /// <summary>
987 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
988 /// </summary>
989 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
990 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
991 /// <param name="sources">Observable sources.</param>
992 /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element. For efficiency, the input list is reused after the selector returns. Either aggregate or copy the values during the function call.</param>
993 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
994 /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="resultSelector"/> is null.</exception>
995 public static IObservable<TResult> CombineLatest<TSource, TResult>(this IEnumerable<IObservable<TSource>> sources, Func<IList<TSource>, TResult> resultSelector)
996 {
997 if (sources == null)
998 throw new ArgumentNullException("sources");
999 if (resultSelector == null)
1000 throw new ArgumentNullException("resultSelector");
1001
1002 return s_impl.CombineLatest<TSource, TResult>(sources, resultSelector);
1003 }
1004
1005 /// <summary>
1006 /// Merges the specified observable sequences into one observable sequence by emitting a list with the latest source elements whenever any of the observable sequences produces an element.
1007 /// </summary>
1008 /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
1009 /// <param name="sources">Observable sources.</param>
1010 /// <returns>An observable sequence containing lists of the latest elements of the sources.</returns>
1011 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1012 public static IObservable<IList<TSource>> CombineLatest<TSource>(this IEnumerable<IObservable<TSource>> sources)
1013 {
1014 if (sources == null)
1015 throw new ArgumentNullException("sources");
1016
1017 return s_impl.CombineLatest<TSource>(sources);
1018 }
1019
1020 /// <summary>
1021 /// Merges the specified observable sequences into one observable sequence by emitting a list with the latest source elements whenever any of the observable sequences produces an element.
1022 /// </summary>
1023 /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
1024 /// <param name="sources">Observable sources.</param>
1025 /// <returns>An observable sequence containing lists of the latest elements of the sources.</returns>
1026 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1027 public static IObservable<IList<TSource>> CombineLatest<TSource>(params IObservable<TSource>[] sources)
1028 {
1029 if (sources == null)
1030 throw new ArgumentNullException("sources");
1031
1032 return s_impl.CombineLatest<TSource>(sources);
1033 }
1034
1035 #endregion
1036
1037 #region + Concat +
1038
1039 /// <summary>
1040 /// Concatenates the second observable sequence to the first observable sequence upon successful termination of the first.
1041 /// </summary>
1042 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1043 /// <param name="first">First observable sequence.</param>
1044 /// <param name="second">Second observable sequence.</param>
1045 /// <returns>An observable sequence that contains the elements of the first sequence, followed by those of the second the sequence.</returns>
1046 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
1047 public static IObservable<TSource> Concat<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
1048 {
1049 if (first == null)
1050 throw new ArgumentNullException("first");
1051 if (second == null)
1052 throw new ArgumentNullException("second");
1053
1054 return s_impl.Concat<TSource>(first, second);
1055 }
1056
1057 /// <summary>
1058 /// Concatenates all of the specified observable sequences, as long as the previous observable sequence terminated successfully.
1059 /// </summary>
1060 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1061 /// <param name="sources">Observable sequences to concatenate.</param>
1062 /// <returns>An observable sequence that contains the elements of each given sequence, in sequential order.</returns>
1063 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1064 public static IObservable<TSource> Concat<TSource>(params IObservable<TSource>[] sources)
1065 {
1066 if (sources == null)
1067 throw new ArgumentNullException("sources");
1068
1069 return s_impl.Concat<TSource>(sources);
1070 }
1071
1072 /// <summary>
1073 /// Concatenates all observable sequences in the given enumerable sequence, as long as the previous observable sequence terminated successfully.
1074 /// </summary>
1075 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1076 /// <param name="sources">Observable sequences to concatenate.</param>
1077 /// <returns>An observable sequence that contains the elements of each given sequence, in sequential order.</returns>
1078 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1079 public static IObservable<TSource> Concat<TSource>(this IEnumerable<IObservable<TSource>> sources)
1080 {
1081 if (sources == null)
1082 throw new ArgumentNullException("sources");
1083
1084 return s_impl.Concat<TSource>(sources);
1085 }
1086
1087 /// <summary>
1088 /// Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully.
1089 /// </summary>
1090 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1091 /// <param name="sources">Observable sequence of inner observable sequences.</param>
1092 /// <returns>An observable sequence that contains the elements of each observed inner sequence, in sequential order.</returns>
1093 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1094 public static IObservable<TSource> Concat<TSource>(this IObservable<IObservable<TSource>> sources)
1095 {
1096 if (sources == null)
1097 throw new ArgumentNullException("sources");
1098
1099 return s_impl.Concat<TSource>(sources);
1100 }
1101
1102 #if !NO_TPL
1103
1104 /// <summary>
1105 /// Concatenates all task results, as long as the previous task terminated successfully.
1106 /// </summary>
1107 /// <typeparam name="TSource">The type of the results produced by the tasks.</typeparam>
1108 /// <param name="sources">Observable sequence of tasks.</param>
1109 /// <returns>An observable sequence that contains the results of each task, in sequential order.</returns>
1110 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1111 /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a concatenation operation using <see cref="Observable.Concat{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
1112 public static IObservable<TSource> Concat<TSource>(this IObservable<Task<TSource>> sources)
1113 {
1114 if (sources == null)
1115 throw new ArgumentNullException("sources");
1116
1117 return s_impl.Concat<TSource>(sources);
1118 }
1119
1120 #endif
1121
1122 #endregion
1123
1124 #region + Merge +
1125
1126 /// <summary>
1127 /// Merges elements from all inner observable sequences into a single observable sequence.
1128 /// </summary>
1129 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1130 /// <param name="sources">Observable sequence of inner observable sequences.</param>
1131 /// <returns>The observable sequence that merges the elements of the inner sequences.</returns>
1132 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1133 public static IObservable<TSource> Merge<TSource>(this IObservable<IObservable<TSource>> sources)
1134 {
1135 if (sources == null)
1136 throw new ArgumentNullException("sources");
1137
1138 return s_impl.Merge<TSource>(sources);
1139 }
1140
1141 #if !NO_TPL
1142
1143 /// <summary>
1144 /// Merges results from all source tasks into a single observable sequence.
1145 /// </summary>
1146 /// <typeparam name="TSource">The type of the results produced by the source tasks.</typeparam>
1147 /// <param name="sources">Observable sequence of tasks.</param>
1148 /// <returns>The observable sequence that merges the results of the source tasks.</returns>
1149 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1150 /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a merge operation using <see cref="Observable.Merge{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
1151 public static IObservable<TSource> Merge<TSource>(this IObservable<Task<TSource>> sources)
1152 {
1153 if (sources == null)
1154 throw new ArgumentNullException("sources");
1155
1156 return s_impl.Merge<TSource>(sources);
1157 }
1158
1159 #endif
1160
1161 /// <summary>
1162 /// Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences.
1163 /// </summary>
1164 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1165 /// <param name="sources">Observable sequence of inner observable sequences.</param>
1166 /// <param name="maxConcurrent">Maximum number of inner observable sequences being subscribed to concurrently.</param>
1167 /// <returns>The observable sequence that merges the elements of the inner sequences.</returns>
1168 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1169 /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
1170 public static IObservable<TSource> Merge<TSource>(this IObservable<IObservable<TSource>> sources, int maxConcurrent)
1171 {
1172 if (sources == null)
1173 throw new ArgumentNullException("sources");
1174 if (maxConcurrent <= 0)
1175 throw new ArgumentOutOfRangeException("maxConcurrent");
1176
1177 return s_impl.Merge<TSource>(sources, maxConcurrent);
1178 }
1179
1180 /// <summary>
1181 /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences.
1182 /// </summary>
1183 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1184 /// <param name="sources">Enumerable sequence of observable sequences.</param>
1185 /// <param name="maxConcurrent">Maximum number of observable sequences being subscribed to concurrently.</param>
1186 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1187 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1188 /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
1189 public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, int maxConcurrent)
1190 {
1191 if (sources == null)
1192 throw new ArgumentNullException("sources");
1193 if (maxConcurrent <= 0)
1194 throw new ArgumentOutOfRangeException("maxConcurrent");
1195
1196 return s_impl.Merge<TSource>(sources, maxConcurrent);
1197 }
1198
1199 /// <summary>
1200 /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences, and using the specified scheduler for enumeration of and subscription to the sources.
1201 /// </summary>
1202 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1203 /// <param name="sources">Enumerable sequence of observable sequences.</param>
1204 /// <param name="maxConcurrent">Maximum number of observable sequences being subscribed to concurrently.</param>
1205 /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
1206 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1207 /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="scheduler"/> is null.</exception>
1208 /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
1209 public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, int maxConcurrent, IScheduler scheduler)
1210 {
1211 if (sources == null)
1212 throw new ArgumentNullException("sources");
1213 if (maxConcurrent <= 0)
1214 throw new ArgumentOutOfRangeException("maxConcurrent");
1215 if (scheduler == null)
1216 throw new ArgumentNullException("scheduler");
1217
1218 return s_impl.Merge<TSource>(sources, maxConcurrent, scheduler);
1219 }
1220
1221 /// <summary>
1222 /// Merges elements from two observable sequences into a single observable sequence.
1223 /// </summary>
1224 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1225 /// <param name="first">First observable sequence.</param>
1226 /// <param name="second">Second observable sequence.</param>
1227 /// <returns>The observable sequence that merges the elements of the given sequences.</returns>
1228 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
1229 public static IObservable<TSource> Merge<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
1230 {
1231 if (first == null)
1232 throw new ArgumentNullException("first");
1233 if (second == null)
1234 throw new ArgumentNullException("second");
1235
1236 return s_impl.Merge<TSource>(first, second);
1237 }
1238
1239 /// <summary>
1240 /// Merges elements from two observable sequences into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
1241 /// </summary>
1242 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1243 /// <param name="first">First observable sequence.</param>
1244 /// <param name="second">Second observable sequence.</param>
1245 /// <param name="scheduler">Scheduler used to introduce concurrency for making subscriptions to the given sequences.</param>
1246 /// <returns>The observable sequence that merges the elements of the given sequences.</returns>
1247 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="scheduler"/> is null.</exception>
1248 public static IObservable<TSource> Merge<TSource>(this IObservable<TSource> first, IObservable<TSource> second, IScheduler scheduler)
1249 {
1250 if (first == null)
1251 throw new ArgumentNullException("first");
1252 if (second == null)
1253 throw new ArgumentNullException("second");
1254 if (scheduler == null)
1255 throw new ArgumentNullException("scheduler");
1256
1257 return s_impl.Merge<TSource>(first, second, scheduler);
1258 }
1259
1260 /// <summary>
1261 /// Merges elements from all of the specified observable sequences into a single observable sequence.
1262 /// </summary>
1263 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1264 /// <param name="sources">Observable sequences.</param>
1265 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1266 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1267 public static IObservable<TSource> Merge<TSource>(params IObservable<TSource>[] sources)
1268 {
1269 if (sources == null)
1270 throw new ArgumentNullException("sources");
1271
1272 return s_impl.Merge<TSource>(sources);
1273 }
1274
1275 /// <summary>
1276 /// Merges elements from all of the specified observable sequences into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
1277 /// </summary>
1278 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1279 /// <param name="sources">Observable sequences.</param>
1280 /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
1281 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1282 /// <exception cref="ArgumentNullException"><paramref name="scheduler"/> or <paramref name="sources"/> is null.</exception>
1283 public static IObservable<TSource> Merge<TSource>(IScheduler scheduler, params IObservable<TSource>[] sources)
1284 {
1285 if (scheduler == null)
1286 throw new ArgumentNullException("scheduler");
1287 if (sources == null)
1288 throw new ArgumentNullException("sources");
1289
1290 return s_impl.Merge<TSource>(scheduler, sources);
1291 }
1292
1293 /// <summary>
1294 /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence.
1295 /// </summary>
1296 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1297 /// <param name="sources">Enumerable sequence of observable sequences.</param>
1298 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1299 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1300 public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources)
1301 {
1302 if (sources == null)
1303 throw new ArgumentNullException("sources");
1304
1305 return s_impl.Merge<TSource>(sources);
1306 }
1307
1308 /// <summary>
1309 /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
1310 /// </summary>
1311 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1312 /// <param name="sources">Enumerable sequence of observable sequences.</param>
1313 /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
1314 /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
1315 /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="scheduler"/> is null.</exception>
1316 public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, IScheduler scheduler)
1317 {
1318 if (sources == null)
1319 throw new ArgumentNullException("sources");
1320 if (scheduler == null)
1321 throw new ArgumentNullException("scheduler");
1322
1323 return s_impl.Merge<TSource>(sources, scheduler);
1324 }
1325
1326 #endregion
1327
1328 #region + OnErrorResumeNext +
1329
1330 /// <summary>
1331 /// Concatenates the second observable sequence to the first observable sequence upon successful or exceptional termination of the first.
1332 /// </summary>
1333 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1334 /// <param name="first">First observable sequence whose exception (if any) is caught.</param>
1335 /// <param name="second">Second observable sequence used to produce results after the first sequence terminates.</param>
1336 /// <returns>An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.</returns>
1337 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
1338 public static IObservable<TSource> OnErrorResumeNext<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
1339 {
1340 if (first == null)
1341 throw new ArgumentNullException("first");
1342 if (second == null)
1343 throw new ArgumentNullException("second");
1344
1345 return s_impl.OnErrorResumeNext<TSource>(first, second);
1346 }
1347
1348 /// <summary>
1349 /// Concatenates all of the specified observable sequences, even if the previous observable sequence terminated exceptionally.
1350 /// </summary>
1351 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1352 /// <param name="sources">Observable sequences to concatenate.</param>
1353 /// <returns>An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.</returns>
1354 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1355 public static IObservable<TSource> OnErrorResumeNext<TSource>(params IObservable<TSource>[] sources)
1356 {
1357 if (sources == null)
1358 throw new ArgumentNullException("sources");
1359
1360 return s_impl.OnErrorResumeNext<TSource>(sources);
1361 }
1362
1363 /// <summary>
1364 /// Concatenates all observable sequences in the given enumerable sequence, even if the previous observable sequence terminated exceptionally.
1365 /// </summary>
1366 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1367 /// <param name="sources">Observable sequences to concatenate.</param>
1368 /// <returns>An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.</returns>
1369 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1370 public static IObservable<TSource> OnErrorResumeNext<TSource>(this IEnumerable<IObservable<TSource>> sources)
1371 {
1372 if (sources == null)
1373 throw new ArgumentNullException("sources");
1374
1375 return s_impl.OnErrorResumeNext<TSource>(sources);
1376 }
1377
1378 #endregion
1379
1380 #region + SkipUntil +
1381
1382 /// <summary>
1383 /// Returns the elements from the source observable sequence only after the other observable sequence produces an element.
1384 /// </summary>
1385 /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
1386 /// <typeparam name="TOther">The type of the elements in the other sequence that indicates the end of skip behavior.</typeparam>
1387 /// <param name="source">Source sequence to propagate elements for.</param>
1388 /// <param name="other">Observable sequence that triggers propagation of elements of the source sequence.</param>
1389 /// <returns>An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation.</returns>
1390 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="other"/> is null.</exception>
1391 public static IObservable<TSource> SkipUntil<TSource, TOther>(this IObservable<TSource> source, IObservable<TOther> other)
1392 {
1393 if (source == null)
1394 throw new ArgumentNullException("source");
1395 if (other == null)
1396 throw new ArgumentNullException("other");
1397
1398 return s_impl.SkipUntil<TSource, TOther>(source, other);
1399 }
1400
1401 #endregion
1402
1403 #region + Switch +
1404
1405 /// <summary>
1406 /// Transforms an observable sequence of observable sequences into an observable sequence
1407 /// producing values only from the most recent observable sequence.
1408 /// Each time a new inner observable sequence is received, unsubscribe from the
1409 /// previous inner observable sequence.
1410 /// </summary>
1411 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
1412 /// <param name="sources">Observable sequence of inner observable sequences.</param>
1413 /// <returns>The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.</returns>
1414 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1415 public static IObservable<TSource> Switch<TSource>(this IObservable<IObservable<TSource>> sources)
1416 {
1417 if (sources == null)
1418 throw new ArgumentNullException("sources");
1419
1420 return s_impl.Switch<TSource>(sources);
1421 }
1422
1423 #if !NO_TPL
1424
1425 /// <summary>
1426 /// Transforms an observable sequence of tasks into an observable sequence
1427 /// producing values only from the most recent observable sequence.
1428 /// Each time a new task is received, the previous task's result is ignored.
1429 /// </summary>
1430 /// <typeparam name="TSource">The type of the results produced by the source tasks.</typeparam>
1431 /// <param name="sources">Observable sequence of tasks.</param>
1432 /// <returns>The observable sequence that at any point in time produces the result of the most recent task that has been received.</returns>
1433 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
1434 /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a switch operation using <see cref="Observable.Switch{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
1435 public static IObservable<TSource> Switch<TSource>(this IObservable<Task<TSource>> sources)
1436 {
1437 if (sources == null)
1438 throw new ArgumentNullException("sources");
1439
1440 return s_impl.Switch<TSource>(sources);
1441 }
1442
1443 #endif
1444
1445 #endregion
1446
1447 #region + TakeUntil +
1448
1449 /// <summary>
1450 /// Returns the elements from the source observable sequence until the other observable sequence produces an element.
1451 /// </summary>
1452 /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
1453 /// <typeparam name="TOther">The type of the elements in the other sequence that indicates the end of take behavior.</typeparam>
1454 /// <param name="source">Source sequence to propagate elements for.</param>
1455 /// <param name="other">Observable sequence that terminates propagation of elements of the source sequence.</param>
1456 /// <returns>An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.</returns>
1457 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="other"/> is null.</exception>
1458 public static IObservable<TSource> TakeUntil<TSource, TOther>(this IObservable<TSource> source, IObservable<TOther> other)
1459 {
1460 if (source == null)
1461 throw new ArgumentNullException("source");
1462 if (other == null)
1463 throw new ArgumentNullException("other");
1464
1465 return s_impl.TakeUntil<TSource, TOther>(source, other);
1466 }
1467
1468 #endregion
1469
1470 #region + Window +
1471
1472 /// <summary>
1473 /// Projects each element of an observable sequence into consecutive non-overlapping windows.
1474 /// </summary>
1475 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
1476 /// <typeparam name="TWindowClosing">The type of the elements in the sequences indicating window closing events.</typeparam>
1477 /// <param name="source">Source sequence to produce windows over.</param>
1478 /// <param name="windowClosingSelector">A function invoked to define the boundaries of the produced windows. A new window is started when the previous one is closed.</param>
1479 /// <returns>An observable sequence of windows.</returns>
1480 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowClosingSelector"/> is null.</exception>
1481 public static IObservable<IObservable<TSource>> Window<TSource, TWindowClosing>(this IObservable<TSource> source, Func<IObservable<TWindowClosing>> windowClosingSelector)
1482 {
1483 if (source == null)
1484 throw new ArgumentNullException("source");
1485 if (windowClosingSelector == null)
1486 throw new ArgumentNullException("windowClosingSelector");
1487
1488 return s_impl.Window<TSource, TWindowClosing>(source, windowClosingSelector);
1489 }
1490
1491 /// <summary>
1492 /// Projects each element of an observable sequence into zero or more windows.
1493 /// </summary>
1494 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
1495 /// <typeparam name="TWindowOpening">The type of the elements in the sequence indicating window opening events, also passed to the closing selector to obtain a sequence of window closing events.</typeparam>
1496 /// <typeparam name="TWindowClosing">The type of the elements in the sequences indicating window closing events.</typeparam>
1497 /// <param name="source">Source sequence to produce windows over.</param>
1498 /// <param name="windowOpenings">Observable sequence whose elements denote the creation of new windows.</param>
1499 /// <param name="windowClosingSelector">A function invoked to define the closing of each produced window.</param>
1500 /// <returns>An observable sequence of windows.</returns>
1501 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowOpenings"/> or <paramref name="windowClosingSelector"/> is null.</exception>
1502 public static IObservable<IObservable<TSource>> Window<TSource, TWindowOpening, TWindowClosing>(this IObservable<TSource> source, IObservable<TWindowOpening> windowOpenings, Func<TWindowOpening, IObservable<TWindowClosing>> windowClosingSelector)
1503 {
1504 if (source == null)
1505 throw new ArgumentNullException("source");
1506 if (windowOpenings == null)
1507 throw new ArgumentNullException("windowOpenings");
1508 if (windowClosingSelector == null)
1509 throw new ArgumentNullException("windowClosingSelector");
1510
1511 return s_impl.Window<TSource, TWindowOpening, TWindowClosing>(source, windowOpenings, windowClosingSelector);
1512 }
1513
1514 /// <summary>
1515 /// Projects each element of an observable sequence into consecutive non-overlapping windows.
1516 /// </summary>
1517 /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
1518 /// <typeparam name="TWindowBoundary">The type of the elements in the sequences indicating window boundary events.</typeparam>
1519 /// <param name="source">Source sequence to produce windows over.</param>
1520 /// <param name="windowBoundaries">Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker.</param>
1521 /// <returns>An observable sequence of windows.</returns>
1522 /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowBoundaries"/> is null.</exception>
1523 public static IObservable<IObservable<TSource>> Window<TSource, TWindowBoundary>(this IObservable<TSource> source, IObservable<TWindowBoundary> windowBoundaries)
1524 {
1525 if (source == null)
1526 throw new ArgumentNullException("source");
1527 if (windowBoundaries == null)
1528 throw new ArgumentNullException("windowBoundaries");
1529
1530 return s_impl.Window<TSource, TWindowBoundary>(source, windowBoundaries);
1531 }
1532
1533 #endregion
1534
1535 #region + Zip +
1536
1537 /// <summary>
1538 /// Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion.
1539 /// </summary>
1540 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1541 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1542 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1543 /// <param name="first">First observable source.</param>
1544 /// <param name="second">Second observable source.</param>
1545 /// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
1546 /// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
1547 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
1548 public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
1549 {
1550 if (first == null)
1551 throw new ArgumentNullException("first");
1552 if (second == null)
1553 throw new ArgumentNullException("second");
1554 if (resultSelector == null)
1555 throw new ArgumentNullException("resultSelector");
1556
1557 return s_impl.Zip<TSource1, TSource2, TResult>(first, second, resultSelector);
1558 }
1559
1560 #if !NO_PERF
1561
1562 /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
1563
1564 #region Zip auto-generated code (8/3/2012 6:37:02 PM)
1565
1566 /// <summary>
1567 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1568 /// </summary>
1569 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1570 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1571 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1572 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1573 /// <param name="source1">First observable source.</param>
1574 /// <param name="source2">Second observable source.</param>
1575 /// <param name="source3">Third observable source.</param>
1576 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1577 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1578 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="resultSelector"/> is null.</exception>
1579 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, Func<TSource1, TSource2, TSource3, TResult> resultSelector)
1580 {
1581 if (source1 == null)
1582 throw new ArgumentNullException("source1");
1583 if (source2 == null)
1584 throw new ArgumentNullException("source2");
1585 if (source3 == null)
1586 throw new ArgumentNullException("source3");
1587 if (resultSelector == null)
1588 throw new ArgumentNullException("resultSelector");
1589
1590 return s_impl.Zip<TSource1, TSource2, TSource3, TResult>(source1, source2, source3, resultSelector);
1591 }
1592
1593 /// <summary>
1594 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1595 /// </summary>
1596 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1597 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1598 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1599 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1600 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1601 /// <param name="source1">First observable source.</param>
1602 /// <param name="source2">Second observable source.</param>
1603 /// <param name="source3">Third observable source.</param>
1604 /// <param name="source4">Fourth observable source.</param>
1605 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1606 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1607 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="resultSelector"/> is null.</exception>
1608 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, Func<TSource1, TSource2, TSource3, TSource4, TResult> resultSelector)
1609 {
1610 if (source1 == null)
1611 throw new ArgumentNullException("source1");
1612 if (source2 == null)
1613 throw new ArgumentNullException("source2");
1614 if (source3 == null)
1615 throw new ArgumentNullException("source3");
1616 if (source4 == null)
1617 throw new ArgumentNullException("source4");
1618 if (resultSelector == null)
1619 throw new ArgumentNullException("resultSelector");
1620
1621 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TResult>(source1, source2, source3, source4, resultSelector);
1622 }
1623
1624 #if !NO_LARGEARITY
1625 /// <summary>
1626 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1627 /// </summary>
1628 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1629 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1630 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1631 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1632 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1633 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1634 /// <param name="source1">First observable source.</param>
1635 /// <param name="source2">Second observable source.</param>
1636 /// <param name="source3">Third observable source.</param>
1637 /// <param name="source4">Fourth observable source.</param>
1638 /// <param name="source5">Fifth observable source.</param>
1639 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1640 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1641 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="resultSelector"/> is null.</exception>
1642 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult> resultSelector)
1643 {
1644 if (source1 == null)
1645 throw new ArgumentNullException("source1");
1646 if (source2 == null)
1647 throw new ArgumentNullException("source2");
1648 if (source3 == null)
1649 throw new ArgumentNullException("source3");
1650 if (source4 == null)
1651 throw new ArgumentNullException("source4");
1652 if (source5 == null)
1653 throw new ArgumentNullException("source5");
1654 if (resultSelector == null)
1655 throw new ArgumentNullException("resultSelector");
1656
1657 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(source1, source2, source3, source4, source5, resultSelector);
1658 }
1659
1660 /// <summary>
1661 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1662 /// </summary>
1663 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1664 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1665 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1666 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1667 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1668 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1669 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1670 /// <param name="source1">First observable source.</param>
1671 /// <param name="source2">Second observable source.</param>
1672 /// <param name="source3">Third observable source.</param>
1673 /// <param name="source4">Fourth observable source.</param>
1674 /// <param name="source5">Fifth observable source.</param>
1675 /// <param name="source6">Sixth observable source.</param>
1676 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1677 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1678 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="resultSelector"/> is null.</exception>
1679 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult> resultSelector)
1680 {
1681 if (source1 == null)
1682 throw new ArgumentNullException("source1");
1683 if (source2 == null)
1684 throw new ArgumentNullException("source2");
1685 if (source3 == null)
1686 throw new ArgumentNullException("source3");
1687 if (source4 == null)
1688 throw new ArgumentNullException("source4");
1689 if (source5 == null)
1690 throw new ArgumentNullException("source5");
1691 if (source6 == null)
1692 throw new ArgumentNullException("source6");
1693 if (resultSelector == null)
1694 throw new ArgumentNullException("resultSelector");
1695
1696 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(source1, source2, source3, source4, source5, source6, resultSelector);
1697 }
1698
1699 /// <summary>
1700 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1701 /// </summary>
1702 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1703 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1704 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1705 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1706 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1707 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1708 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1709 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1710 /// <param name="source1">First observable source.</param>
1711 /// <param name="source2">Second observable source.</param>
1712 /// <param name="source3">Third observable source.</param>
1713 /// <param name="source4">Fourth observable source.</param>
1714 /// <param name="source5">Fifth observable source.</param>
1715 /// <param name="source6">Sixth observable source.</param>
1716 /// <param name="source7">Seventh observable source.</param>
1717 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1718 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1719 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="resultSelector"/> is null.</exception>
1720 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult> resultSelector)
1721 {
1722 if (source1 == null)
1723 throw new ArgumentNullException("source1");
1724 if (source2 == null)
1725 throw new ArgumentNullException("source2");
1726 if (source3 == null)
1727 throw new ArgumentNullException("source3");
1728 if (source4 == null)
1729 throw new ArgumentNullException("source4");
1730 if (source5 == null)
1731 throw new ArgumentNullException("source5");
1732 if (source6 == null)
1733 throw new ArgumentNullException("source6");
1734 if (source7 == null)
1735 throw new ArgumentNullException("source7");
1736 if (resultSelector == null)
1737 throw new ArgumentNullException("resultSelector");
1738
1739 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(source1, source2, source3, source4, source5, source6, source7, resultSelector);
1740 }
1741
1742 /// <summary>
1743 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1744 /// </summary>
1745 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1746 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1747 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1748 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1749 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1750 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1751 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1752 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1753 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1754 /// <param name="source1">First observable source.</param>
1755 /// <param name="source2">Second observable source.</param>
1756 /// <param name="source3">Third observable source.</param>
1757 /// <param name="source4">Fourth observable source.</param>
1758 /// <param name="source5">Fifth observable source.</param>
1759 /// <param name="source6">Sixth observable source.</param>
1760 /// <param name="source7">Seventh observable source.</param>
1761 /// <param name="source8">Eighth observable source.</param>
1762 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1763 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1764 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="resultSelector"/> is null.</exception>
1765 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult> resultSelector)
1766 {
1767 if (source1 == null)
1768 throw new ArgumentNullException("source1");
1769 if (source2 == null)
1770 throw new ArgumentNullException("source2");
1771 if (source3 == null)
1772 throw new ArgumentNullException("source3");
1773 if (source4 == null)
1774 throw new ArgumentNullException("source4");
1775 if (source5 == null)
1776 throw new ArgumentNullException("source5");
1777 if (source6 == null)
1778 throw new ArgumentNullException("source6");
1779 if (source7 == null)
1780 throw new ArgumentNullException("source7");
1781 if (source8 == null)
1782 throw new ArgumentNullException("source8");
1783 if (resultSelector == null)
1784 throw new ArgumentNullException("resultSelector");
1785
1786 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector);
1787 }
1788
1789 /// <summary>
1790 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1791 /// </summary>
1792 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1793 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1794 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1795 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1796 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1797 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1798 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1799 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1800 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
1801 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1802 /// <param name="source1">First observable source.</param>
1803 /// <param name="source2">Second observable source.</param>
1804 /// <param name="source3">Third observable source.</param>
1805 /// <param name="source4">Fourth observable source.</param>
1806 /// <param name="source5">Fifth observable source.</param>
1807 /// <param name="source6">Sixth observable source.</param>
1808 /// <param name="source7">Seventh observable source.</param>
1809 /// <param name="source8">Eighth observable source.</param>
1810 /// <param name="source9">Ninth observable source.</param>
1811 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1812 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1813 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="resultSelector"/> is null.</exception>
1814 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult> resultSelector)
1815 {
1816 if (source1 == null)
1817 throw new ArgumentNullException("source1");
1818 if (source2 == null)
1819 throw new ArgumentNullException("source2");
1820 if (source3 == null)
1821 throw new ArgumentNullException("source3");
1822 if (source4 == null)
1823 throw new ArgumentNullException("source4");
1824 if (source5 == null)
1825 throw new ArgumentNullException("source5");
1826 if (source6 == null)
1827 throw new ArgumentNullException("source6");
1828 if (source7 == null)
1829 throw new ArgumentNullException("source7");
1830 if (source8 == null)
1831 throw new ArgumentNullException("source8");
1832 if (source9 == null)
1833 throw new ArgumentNullException("source9");
1834 if (resultSelector == null)
1835 throw new ArgumentNullException("resultSelector");
1836
1837 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector);
1838 }
1839
1840 /// <summary>
1841 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1842 /// </summary>
1843 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1844 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1845 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1846 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1847 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1848 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1849 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1850 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1851 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
1852 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
1853 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1854 /// <param name="source1">First observable source.</param>
1855 /// <param name="source2">Second observable source.</param>
1856 /// <param name="source3">Third observable source.</param>
1857 /// <param name="source4">Fourth observable source.</param>
1858 /// <param name="source5">Fifth observable source.</param>
1859 /// <param name="source6">Sixth observable source.</param>
1860 /// <param name="source7">Seventh observable source.</param>
1861 /// <param name="source8">Eighth observable source.</param>
1862 /// <param name="source9">Ninth observable source.</param>
1863 /// <param name="source10">Tenth observable source.</param>
1864 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1865 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1866 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="resultSelector"/> is null.</exception>
1867 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult> resultSelector)
1868 {
1869 if (source1 == null)
1870 throw new ArgumentNullException("source1");
1871 if (source2 == null)
1872 throw new ArgumentNullException("source2");
1873 if (source3 == null)
1874 throw new ArgumentNullException("source3");
1875 if (source4 == null)
1876 throw new ArgumentNullException("source4");
1877 if (source5 == null)
1878 throw new ArgumentNullException("source5");
1879 if (source6 == null)
1880 throw new ArgumentNullException("source6");
1881 if (source7 == null)
1882 throw new ArgumentNullException("source7");
1883 if (source8 == null)
1884 throw new ArgumentNullException("source8");
1885 if (source9 == null)
1886 throw new ArgumentNullException("source9");
1887 if (source10 == null)
1888 throw new ArgumentNullException("source10");
1889 if (resultSelector == null)
1890 throw new ArgumentNullException("resultSelector");
1891
1892 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector);
1893 }
1894
1895 /// <summary>
1896 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1897 /// </summary>
1898 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1899 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1900 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1901 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1902 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1903 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1904 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1905 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1906 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
1907 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
1908 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
1909 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1910 /// <param name="source1">First observable source.</param>
1911 /// <param name="source2">Second observable source.</param>
1912 /// <param name="source3">Third observable source.</param>
1913 /// <param name="source4">Fourth observable source.</param>
1914 /// <param name="source5">Fifth observable source.</param>
1915 /// <param name="source6">Sixth observable source.</param>
1916 /// <param name="source7">Seventh observable source.</param>
1917 /// <param name="source8">Eighth observable source.</param>
1918 /// <param name="source9">Ninth observable source.</param>
1919 /// <param name="source10">Tenth observable source.</param>
1920 /// <param name="source11">Eleventh observable source.</param>
1921 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1922 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1923 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="resultSelector"/> is null.</exception>
1924 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult> resultSelector)
1925 {
1926 if (source1 == null)
1927 throw new ArgumentNullException("source1");
1928 if (source2 == null)
1929 throw new ArgumentNullException("source2");
1930 if (source3 == null)
1931 throw new ArgumentNullException("source3");
1932 if (source4 == null)
1933 throw new ArgumentNullException("source4");
1934 if (source5 == null)
1935 throw new ArgumentNullException("source5");
1936 if (source6 == null)
1937 throw new ArgumentNullException("source6");
1938 if (source7 == null)
1939 throw new ArgumentNullException("source7");
1940 if (source8 == null)
1941 throw new ArgumentNullException("source8");
1942 if (source9 == null)
1943 throw new ArgumentNullException("source9");
1944 if (source10 == null)
1945 throw new ArgumentNullException("source10");
1946 if (source11 == null)
1947 throw new ArgumentNullException("source11");
1948 if (resultSelector == null)
1949 throw new ArgumentNullException("resultSelector");
1950
1951 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector);
1952 }
1953
1954 /// <summary>
1955 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
1956 /// </summary>
1957 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
1958 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
1959 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
1960 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
1961 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
1962 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
1963 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
1964 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
1965 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
1966 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
1967 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
1968 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
1969 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
1970 /// <param name="source1">First observable source.</param>
1971 /// <param name="source2">Second observable source.</param>
1972 /// <param name="source3">Third observable source.</param>
1973 /// <param name="source4">Fourth observable source.</param>
1974 /// <param name="source5">Fifth observable source.</param>
1975 /// <param name="source6">Sixth observable source.</param>
1976 /// <param name="source7">Seventh observable source.</param>
1977 /// <param name="source8">Eighth observable source.</param>
1978 /// <param name="source9">Ninth observable source.</param>
1979 /// <param name="source10">Tenth observable source.</param>
1980 /// <param name="source11">Eleventh observable source.</param>
1981 /// <param name="source12">Twelfth observable source.</param>
1982 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
1983 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
1984 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="resultSelector"/> is null.</exception>
1985 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult> resultSelector)
1986 {
1987 if (source1 == null)
1988 throw new ArgumentNullException("source1");
1989 if (source2 == null)
1990 throw new ArgumentNullException("source2");
1991 if (source3 == null)
1992 throw new ArgumentNullException("source3");
1993 if (source4 == null)
1994 throw new ArgumentNullException("source4");
1995 if (source5 == null)
1996 throw new ArgumentNullException("source5");
1997 if (source6 == null)
1998 throw new ArgumentNullException("source6");
1999 if (source7 == null)
2000 throw new ArgumentNullException("source7");
2001 if (source8 == null)
2002 throw new ArgumentNullException("source8");
2003 if (source9 == null)
2004 throw new ArgumentNullException("source9");
2005 if (source10 == null)
2006 throw new ArgumentNullException("source10");
2007 if (source11 == null)
2008 throw new ArgumentNullException("source11");
2009 if (source12 == null)
2010 throw new ArgumentNullException("source12");
2011 if (resultSelector == null)
2012 throw new ArgumentNullException("resultSelector");
2013
2014 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector);
2015 }
2016
2017 /// <summary>
2018 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
2019 /// </summary>
2020 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
2021 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
2022 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
2023 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
2024 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
2025 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
2026 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
2027 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
2028 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
2029 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
2030 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
2031 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
2032 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
2033 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2034 /// <param name="source1">First observable source.</param>
2035 /// <param name="source2">Second observable source.</param>
2036 /// <param name="source3">Third observable source.</param>
2037 /// <param name="source4">Fourth observable source.</param>
2038 /// <param name="source5">Fifth observable source.</param>
2039 /// <param name="source6">Sixth observable source.</param>
2040 /// <param name="source7">Seventh observable source.</param>
2041 /// <param name="source8">Eighth observable source.</param>
2042 /// <param name="source9">Ninth observable source.</param>
2043 /// <param name="source10">Tenth observable source.</param>
2044 /// <param name="source11">Eleventh observable source.</param>
2045 /// <param name="source12">Twelfth observable source.</param>
2046 /// <param name="source13">Thirteenth observable source.</param>
2047 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
2048 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
2049 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="resultSelector"/> is null.</exception>
2050 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult> resultSelector)
2051 {
2052 if (source1 == null)
2053 throw new ArgumentNullException("source1");
2054 if (source2 == null)
2055 throw new ArgumentNullException("source2");
2056 if (source3 == null)
2057 throw new ArgumentNullException("source3");
2058 if (source4 == null)
2059 throw new ArgumentNullException("source4");
2060 if (source5 == null)
2061 throw new ArgumentNullException("source5");
2062 if (source6 == null)
2063 throw new ArgumentNullException("source6");
2064 if (source7 == null)
2065 throw new ArgumentNullException("source7");
2066 if (source8 == null)
2067 throw new ArgumentNullException("source8");
2068 if (source9 == null)
2069 throw new ArgumentNullException("source9");
2070 if (source10 == null)
2071 throw new ArgumentNullException("source10");
2072 if (source11 == null)
2073 throw new ArgumentNullException("source11");
2074 if (source12 == null)
2075 throw new ArgumentNullException("source12");
2076 if (source13 == null)
2077 throw new ArgumentNullException("source13");
2078 if (resultSelector == null)
2079 throw new ArgumentNullException("resultSelector");
2080
2081 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector);
2082 }
2083
2084 /// <summary>
2085 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
2086 /// </summary>
2087 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
2088 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
2089 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
2090 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
2091 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
2092 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
2093 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
2094 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
2095 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
2096 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
2097 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
2098 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
2099 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
2100 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
2101 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2102 /// <param name="source1">First observable source.</param>
2103 /// <param name="source2">Second observable source.</param>
2104 /// <param name="source3">Third observable source.</param>
2105 /// <param name="source4">Fourth observable source.</param>
2106 /// <param name="source5">Fifth observable source.</param>
2107 /// <param name="source6">Sixth observable source.</param>
2108 /// <param name="source7">Seventh observable source.</param>
2109 /// <param name="source8">Eighth observable source.</param>
2110 /// <param name="source9">Ninth observable source.</param>
2111 /// <param name="source10">Tenth observable source.</param>
2112 /// <param name="source11">Eleventh observable source.</param>
2113 /// <param name="source12">Twelfth observable source.</param>
2114 /// <param name="source13">Thirteenth observable source.</param>
2115 /// <param name="source14">Fourteenth observable source.</param>
2116 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
2117 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
2118 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="resultSelector"/> is null.</exception>
2119 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult> resultSelector)
2120 {
2121 if (source1 == null)
2122 throw new ArgumentNullException("source1");
2123 if (source2 == null)
2124 throw new ArgumentNullException("source2");
2125 if (source3 == null)
2126 throw new ArgumentNullException("source3");
2127 if (source4 == null)
2128 throw new ArgumentNullException("source4");
2129 if (source5 == null)
2130 throw new ArgumentNullException("source5");
2131 if (source6 == null)
2132 throw new ArgumentNullException("source6");
2133 if (source7 == null)
2134 throw new ArgumentNullException("source7");
2135 if (source8 == null)
2136 throw new ArgumentNullException("source8");
2137 if (source9 == null)
2138 throw new ArgumentNullException("source9");
2139 if (source10 == null)
2140 throw new ArgumentNullException("source10");
2141 if (source11 == null)
2142 throw new ArgumentNullException("source11");
2143 if (source12 == null)
2144 throw new ArgumentNullException("source12");
2145 if (source13 == null)
2146 throw new ArgumentNullException("source13");
2147 if (source14 == null)
2148 throw new ArgumentNullException("source14");
2149 if (resultSelector == null)
2150 throw new ArgumentNullException("resultSelector");
2151
2152 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector);
2153 }
2154
2155 /// <summary>
2156 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
2157 /// </summary>
2158 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
2159 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
2160 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
2161 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
2162 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
2163 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
2164 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
2165 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
2166 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
2167 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
2168 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
2169 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
2170 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
2171 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
2172 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
2173 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2174 /// <param name="source1">First observable source.</param>
2175 /// <param name="source2">Second observable source.</param>
2176 /// <param name="source3">Third observable source.</param>
2177 /// <param name="source4">Fourth observable source.</param>
2178 /// <param name="source5">Fifth observable source.</param>
2179 /// <param name="source6">Sixth observable source.</param>
2180 /// <param name="source7">Seventh observable source.</param>
2181 /// <param name="source8">Eighth observable source.</param>
2182 /// <param name="source9">Ninth observable source.</param>
2183 /// <param name="source10">Tenth observable source.</param>
2184 /// <param name="source11">Eleventh observable source.</param>
2185 /// <param name="source12">Twelfth observable source.</param>
2186 /// <param name="source13">Thirteenth observable source.</param>
2187 /// <param name="source14">Fourteenth observable source.</param>
2188 /// <param name="source15">Fifteenth observable source.</param>
2189 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
2190 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
2191 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="resultSelector"/> is null.</exception>
2192 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> resultSelector)
2193 {
2194 if (source1 == null)
2195 throw new ArgumentNullException("source1");
2196 if (source2 == null)
2197 throw new ArgumentNullException("source2");
2198 if (source3 == null)
2199 throw new ArgumentNullException("source3");
2200 if (source4 == null)
2201 throw new ArgumentNullException("source4");
2202 if (source5 == null)
2203 throw new ArgumentNullException("source5");
2204 if (source6 == null)
2205 throw new ArgumentNullException("source6");
2206 if (source7 == null)
2207 throw new ArgumentNullException("source7");
2208 if (source8 == null)
2209 throw new ArgumentNullException("source8");
2210 if (source9 == null)
2211 throw new ArgumentNullException("source9");
2212 if (source10 == null)
2213 throw new ArgumentNullException("source10");
2214 if (source11 == null)
2215 throw new ArgumentNullException("source11");
2216 if (source12 == null)
2217 throw new ArgumentNullException("source12");
2218 if (source13 == null)
2219 throw new ArgumentNullException("source13");
2220 if (source14 == null)
2221 throw new ArgumentNullException("source14");
2222 if (source15 == null)
2223 throw new ArgumentNullException("source15");
2224 if (resultSelector == null)
2225 throw new ArgumentNullException("resultSelector");
2226
2227 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector);
2228 }
2229
2230 /// <summary>
2231 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
2232 /// </summary>
2233 /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
2234 /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
2235 /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
2236 /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
2237 /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
2238 /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
2239 /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
2240 /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
2241 /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
2242 /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
2243 /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
2244 /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
2245 /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
2246 /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
2247 /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
2248 /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
2249 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2250 /// <param name="source1">First observable source.</param>
2251 /// <param name="source2">Second observable source.</param>
2252 /// <param name="source3">Third observable source.</param>
2253 /// <param name="source4">Fourth observable source.</param>
2254 /// <param name="source5">Fifth observable source.</param>
2255 /// <param name="source6">Sixth observable source.</param>
2256 /// <param name="source7">Seventh observable source.</param>
2257 /// <param name="source8">Eighth observable source.</param>
2258 /// <param name="source9">Ninth observable source.</param>
2259 /// <param name="source10">Tenth observable source.</param>
2260 /// <param name="source11">Eleventh observable source.</param>
2261 /// <param name="source12">Twelfth observable source.</param>
2262 /// <param name="source13">Thirteenth observable source.</param>
2263 /// <param name="source14">Fourteenth observable source.</param>
2264 /// <param name="source15">Fifteenth observable source.</param>
2265 /// <param name="source16">Sixteenth observable source.</param>
2266 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
2267 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
2268 /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="source16"/> or <paramref name="resultSelector"/> is null.</exception>
2269 public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, IObservable<TSource16> source16, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult> resultSelector)
2270 {
2271 if (source1 == null)
2272 throw new ArgumentNullException("source1");
2273 if (source2 == null)
2274 throw new ArgumentNullException("source2");
2275 if (source3 == null)
2276 throw new ArgumentNullException("source3");
2277 if (source4 == null)
2278 throw new ArgumentNullException("source4");
2279 if (source5 == null)
2280 throw new ArgumentNullException("source5");
2281 if (source6 == null)
2282 throw new ArgumentNullException("source6");
2283 if (source7 == null)
2284 throw new ArgumentNullException("source7");
2285 if (source8 == null)
2286 throw new ArgumentNullException("source8");
2287 if (source9 == null)
2288 throw new ArgumentNullException("source9");
2289 if (source10 == null)
2290 throw new ArgumentNullException("source10");
2291 if (source11 == null)
2292 throw new ArgumentNullException("source11");
2293 if (source12 == null)
2294 throw new ArgumentNullException("source12");
2295 if (source13 == null)
2296 throw new ArgumentNullException("source13");
2297 if (source14 == null)
2298 throw new ArgumentNullException("source14");
2299 if (source15 == null)
2300 throw new ArgumentNullException("source15");
2301 if (source16 == null)
2302 throw new ArgumentNullException("source16");
2303 if (resultSelector == null)
2304 throw new ArgumentNullException("resultSelector");
2305
2306 return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector);
2307 }
2308
2309 #endif
2310
2311 #endregion
2312
2313 #endif
2314
2315 /// <summary>
2316 /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
2317 /// </summary>
2318 /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
2319 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2320 /// <param name="sources">Observable sources.</param>
2321 /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
2322 /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
2323 /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="resultSelector"/> is null.</exception>
2324 public static IObservable<TResult> Zip<TSource, TResult>(this IEnumerable<IObservable<TSource>> sources, Func<IList<TSource>, TResult> resultSelector)
2325 {
2326 if (sources == null)
2327 throw new ArgumentNullException("sources");
2328 if (resultSelector == null)
2329 throw new ArgumentNullException("resultSelector");
2330
2331 return s_impl.Zip<TSource, TResult>(sources, resultSelector);
2332 }
2333
2334 /// <summary>
2335 /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes.
2336 /// </summary>
2337 /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
2338 /// <param name="sources">Observable sources.</param>
2339 /// <returns>An observable sequence containing lists of elements at corresponding indexes.</returns>
2340 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
2341 public static IObservable<IList<TSource>> Zip<TSource>(this IEnumerable<IObservable<TSource>> sources)
2342 {
2343 if (sources == null)
2344 throw new ArgumentNullException("sources");
2345
2346 return s_impl.Zip<TSource>(sources);
2347 }
2348
2349 /// <summary>
2350 /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes.
2351 /// </summary>
2352 /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
2353 /// <param name="sources">Observable sources.</param>
2354 /// <returns>An observable sequence containing lists of elements at corresponding indexes.</returns>
2355 /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
2356 public static IObservable<IList<TSource>> Zip<TSource>(params IObservable<TSource>[] sources)
2357 {
2358 if (sources == null)
2359 throw new ArgumentNullException("sources");
2360
2361 return s_impl.Zip<TSource>(sources);
2362 }
2363
2364 /// <summary>
2365 /// Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.
2366 /// </summary>
2367 /// <typeparam name="TSource1">The type of the elements in the first observable source sequence.</typeparam>
2368 /// <typeparam name="TSource2">The type of the elements in the second enumerable source sequence.</typeparam>
2369 /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
2370 /// <param name="first">First observable source.</param>
2371 /// <param name="second">Second enumerable source.</param>
2372 /// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
2373 /// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
2374 /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
2375 public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IEnumerable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
2376 {
2377 if (first == null)
2378 throw new ArgumentNullException("first");
2379 if (second == null)
2380 throw new ArgumentNullException("second");
2381 if (resultSelector == null)
2382 throw new ArgumentNullException("resultSelector");
2383
2384 return s_impl.Zip<TSource1, TSource2, TResult>(first, second, resultSelector);
2385 }
2386
2387 #endregion
2388 }
2389 }