// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System.Collections.Generic; using System.Reactive.Concurrency; #if !NO_TPL using System.Threading; // Used in XML doc comments using System.Threading.Tasks; #endif namespace System.Reactive.Linq { public static partial class Observable { #region + Amb + /// /// Propagates the observable sequence that reacts first. /// /// The type of the elements in the source sequences. /// First observable sequence. /// Second observable sequence. /// An observable sequence that surfaces either of the given sequences, whichever reacted first. /// or is null. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")] public static IObservable Amb(this IObservable first, IObservable second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return s_impl.Amb(first, second); } /// /// Propagates the observable sequence that reacts first. /// /// The type of the elements in the source sequences. /// Observable sources competing to react first. /// An observable sequence that surfaces any of the given sequences, whichever reacted first. /// is null. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")] public static IObservable Amb(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Amb(sources); } /// /// Propagates the observable sequence that reacts first. /// /// The type of the elements in the source sequences. /// Observable sources competing to react first. /// An observable sequence that surfaces any of the given sequences, whichever reacted first. /// is null. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")] public static IObservable Amb(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Amb(sources); } #endregion #region Buffer /// /// Projects each element of an observable sequence into consecutive non-overlapping buffers. /// /// The type of the elements in the source sequence, and in the lists in the result sequence. /// The type of the elements in the sequences indicating buffer closing events. /// Source sequence to produce buffers over. /// A function invoked to define the boundaries of the produced buffers. A new buffer is started when the previous one is closed. /// An observable sequence of buffers. /// or is null. public static IObservable> Buffer(this IObservable source, Func> bufferClosingSelector) { if (source == null) throw new ArgumentNullException("source"); if (bufferClosingSelector == null) throw new ArgumentNullException("bufferClosingSelector"); return s_impl.Buffer(source, bufferClosingSelector); } /// /// Projects each element of an observable sequence into zero or more buffers. /// /// The type of the elements in the source sequence, and in the lists in the result sequence. /// 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. /// The type of the elements in the sequences indicating buffer closing events. /// Source sequence to produce buffers over. /// Observable sequence whose elements denote the creation of new buffers. /// A function invoked to define the closing of each produced buffer. /// An observable sequence of buffers. /// or or is null. public static IObservable> Buffer(this IObservable source, IObservable bufferOpenings, Func> bufferClosingSelector) { if (source == null) throw new ArgumentNullException("source"); if (bufferOpenings == null) throw new ArgumentNullException("bufferOpenings"); if (bufferClosingSelector == null) throw new ArgumentNullException("bufferClosingSelector"); return s_impl.Buffer(source, bufferOpenings, bufferClosingSelector); } /// /// Projects each element of an observable sequence into consecutive non-overlapping buffers. /// /// The type of the elements in the source sequence, and in the lists in the result sequence. /// The type of the elements in the sequences indicating buffer boundary events. /// Source sequence to produce buffers over. /// Sequence of buffer boundary markers. The current buffer is closed and a new buffer is opened upon receiving a boundary marker. /// An observable sequence of buffers. /// or is null. public static IObservable> Buffer(this IObservable source, IObservable bufferBoundaries) { if (source == null) throw new ArgumentNullException("source"); if (bufferBoundaries == null) throw new ArgumentNullException("bufferBoundaries"); return s_impl.Buffer(source, bufferBoundaries); } #endregion #region + Catch + /// /// Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler. /// /// The type of the elements in the source sequence and sequences returned by the exception handler function. /// The type of the exception to catch and handle. Needs to derive from . /// Source sequence. /// Exception handler function, producing another observable sequence. /// 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. /// or is null. public static IObservable Catch(this IObservable source, Func> handler) where TException : Exception { if (source == null) throw new ArgumentNullException("source"); if (handler == null) throw new ArgumentNullException("handler"); return s_impl.Catch(source, handler); } /// /// Continues an observable sequence that is terminated by an exception with the next observable sequence. /// /// The type of the elements in the source sequence and handler sequence. /// First observable sequence whose exception (if any) is caught. /// Second observable sequence used to produce results when an error occurred in the first sequence. /// An observable sequence containing the first sequence's elements, followed by the elements of the second sequence in case an exception occurred. /// or is null. public static IObservable Catch(this IObservable first, IObservable second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return s_impl.Catch(first, second); } /// /// Continues an observable sequence that is terminated by an exception with the next observable sequence. /// /// The type of the elements in the source and handler sequences. /// Observable sequences to catch exceptions for. /// An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. /// is null. public static IObservable Catch(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Catch(sources); } /// /// Continues an observable sequence that is terminated by an exception with the next observable sequence. /// /// The type of the elements in the source and handler sequences. /// Observable sequences to catch exceptions for. /// An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. /// is null. public static IObservable Catch(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Catch(sources); } #endregion #region + CombineLatest + /// /// Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Function to invoke whenever either of the sources produces an element. /// An observable sequence containing the result of combining elements of both sources using the specified result selector function. /// or or is null. public static IObservable CombineLatest(this IObservable first, IObservable second, Func resultSelector) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(first, second, resultSelector); } #if !NO_PERF /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */ #region CombineLatest auto-generated code (8/3/2012 6:37:08 PM) /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, resultSelector); } #if !NO_LARGEARITY /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Fifteenth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, IObservable source15, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (source15 == null) throw new ArgumentNullException("source15"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. /// The type of the elements in the sixteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Fifteenth observable source. /// Sixteenth observable source. /// Function to invoke whenever any of the sources produces an element. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or or or is null. public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, IObservable source15, IObservable source16, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (source15 == null) throw new ArgumentNullException("source15"); if (source16 == null) throw new ArgumentNullException("source16"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector); } #endif #endregion #endif /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// /// The type of the elements in the source sequences. /// The type of the elements in the result sequence, returned by the selector function. /// Observable sources. /// 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. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or is null. public static IObservable CombineLatest(this IEnumerable> sources, Func, TResult> resultSelector) { if (sources == null) throw new ArgumentNullException("sources"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.CombineLatest(sources, resultSelector); } /// /// 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. /// /// The type of the elements in the source sequences, and in the lists in the result sequence. /// Observable sources. /// An observable sequence containing lists of the latest elements of the sources. /// is null. public static IObservable> CombineLatest(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.CombineLatest(sources); } /// /// 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. /// /// The type of the elements in the source sequences, and in the lists in the result sequence. /// Observable sources. /// An observable sequence containing lists of the latest elements of the sources. /// is null. public static IObservable> CombineLatest(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.CombineLatest(sources); } #endregion #region + Concat + /// /// Concatenates the second observable sequence to the first observable sequence upon successful termination of the first. /// /// The type of the elements in the source sequences. /// First observable sequence. /// Second observable sequence. /// An observable sequence that contains the elements of the first sequence, followed by those of the second the sequence. /// or is null. public static IObservable Concat(this IObservable first, IObservable second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return s_impl.Concat(first, second); } /// /// Concatenates all of the specified observable sequences, as long as the previous observable sequence terminated successfully. /// /// The type of the elements in the source sequences. /// Observable sequences to concatenate. /// An observable sequence that contains the elements of each given sequence, in sequential order. /// is null. public static IObservable Concat(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Concat(sources); } /// /// Concatenates all observable sequences in the given enumerable sequence, as long as the previous observable sequence terminated successfully. /// /// The type of the elements in the source sequences. /// Observable sequences to concatenate. /// An observable sequence that contains the elements of each given sequence, in sequential order. /// is null. public static IObservable Concat(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Concat(sources); } /// /// Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. /// /// The type of the elements in the source sequences. /// Observable sequence of inner observable sequences. /// An observable sequence that contains the elements of each observed inner sequence, in sequential order. /// is null. public static IObservable Concat(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Concat(sources); } #if !NO_TPL /// /// Concatenates all task results, as long as the previous task terminated successfully. /// /// The type of the results produced by the tasks. /// Observable sequence of tasks. /// An observable sequence that contains the results of each task, in sequential order. /// is null. /// If the tasks support cancellation, consider manual conversion of the tasks using , followed by a concatenation operation using . public static IObservable Concat(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Concat(sources); } #endif #endregion #region + Merge + /// /// Merges elements from all inner observable sequences into a single observable sequence. /// /// The type of the elements in the source sequences. /// Observable sequence of inner observable sequences. /// The observable sequence that merges the elements of the inner sequences. /// is null. public static IObservable Merge(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Merge(sources); } #if !NO_TPL /// /// Merges results from all source tasks into a single observable sequence. /// /// The type of the results produced by the source tasks. /// Observable sequence of tasks. /// The observable sequence that merges the results of the source tasks. /// is null. /// If the tasks support cancellation, consider manual conversion of the tasks using , followed by a merge operation using . public static IObservable Merge(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Merge(sources); } #endif /// /// Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. /// /// The type of the elements in the source sequences. /// Observable sequence of inner observable sequences. /// Maximum number of inner observable sequences being subscribed to concurrently. /// The observable sequence that merges the elements of the inner sequences. /// is null. /// is less than or equal to zero. public static IObservable Merge(this IObservable> sources, int maxConcurrent) { if (sources == null) throw new ArgumentNullException("sources"); if (maxConcurrent <= 0) throw new ArgumentOutOfRangeException("maxConcurrent"); return s_impl.Merge(sources, maxConcurrent); } /// /// 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. /// /// The type of the elements in the source sequences. /// Enumerable sequence of observable sequences. /// Maximum number of observable sequences being subscribed to concurrently. /// The observable sequence that merges the elements of the observable sequences. /// is null. /// is less than or equal to zero. public static IObservable Merge(this IEnumerable> sources, int maxConcurrent) { if (sources == null) throw new ArgumentNullException("sources"); if (maxConcurrent <= 0) throw new ArgumentOutOfRangeException("maxConcurrent"); return s_impl.Merge(sources, maxConcurrent); } /// /// 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. /// /// The type of the elements in the source sequences. /// Enumerable sequence of observable sequences. /// Maximum number of observable sequences being subscribed to concurrently. /// Scheduler to run the enumeration of the sequence of sources on. /// The observable sequence that merges the elements of the observable sequences. /// or is null. /// is less than or equal to zero. public static IObservable Merge(this IEnumerable> sources, int maxConcurrent, IScheduler scheduler) { if (sources == null) throw new ArgumentNullException("sources"); if (maxConcurrent <= 0) throw new ArgumentOutOfRangeException("maxConcurrent"); if (scheduler == null) throw new ArgumentNullException("scheduler"); return s_impl.Merge(sources, maxConcurrent, scheduler); } /// /// Merges elements from two observable sequences into a single observable sequence. /// /// The type of the elements in the source sequences. /// First observable sequence. /// Second observable sequence. /// The observable sequence that merges the elements of the given sequences. /// or is null. public static IObservable Merge(this IObservable first, IObservable second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return s_impl.Merge(first, second); } /// /// Merges elements from two observable sequences into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources. /// /// The type of the elements in the source sequences. /// First observable sequence. /// Second observable sequence. /// Scheduler used to introduce concurrency for making subscriptions to the given sequences. /// The observable sequence that merges the elements of the given sequences. /// or or is null. public static IObservable Merge(this IObservable first, IObservable second, IScheduler scheduler) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); if (scheduler == null) throw new ArgumentNullException("scheduler"); return s_impl.Merge(first, second, scheduler); } /// /// Merges elements from all of the specified observable sequences into a single observable sequence. /// /// The type of the elements in the source sequences. /// Observable sequences. /// The observable sequence that merges the elements of the observable sequences. /// is null. public static IObservable Merge(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Merge(sources); } /// /// 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. /// /// The type of the elements in the source sequences. /// Observable sequences. /// Scheduler to run the enumeration of the sequence of sources on. /// The observable sequence that merges the elements of the observable sequences. /// or is null. public static IObservable Merge(IScheduler scheduler, params IObservable[] sources) { if (scheduler == null) throw new ArgumentNullException("scheduler"); if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Merge(scheduler, sources); } /// /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. /// /// The type of the elements in the source sequences. /// Enumerable sequence of observable sequences. /// The observable sequence that merges the elements of the observable sequences. /// is null. public static IObservable Merge(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Merge(sources); } /// /// 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. /// /// The type of the elements in the source sequences. /// Enumerable sequence of observable sequences. /// Scheduler to run the enumeration of the sequence of sources on. /// The observable sequence that merges the elements of the observable sequences. /// or is null. public static IObservable Merge(this IEnumerable> sources, IScheduler scheduler) { if (sources == null) throw new ArgumentNullException("sources"); if (scheduler == null) throw new ArgumentNullException("scheduler"); return s_impl.Merge(sources, scheduler); } #endregion #region + OnErrorResumeNext + /// /// Concatenates the second observable sequence to the first observable sequence upon successful or exceptional termination of the first. /// /// The type of the elements in the source sequences. /// First observable sequence whose exception (if any) is caught. /// Second observable sequence used to produce results after the first sequence terminates. /// An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally. /// or is null. public static IObservable OnErrorResumeNext(this IObservable first, IObservable second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return s_impl.OnErrorResumeNext(first, second); } /// /// Concatenates all of the specified observable sequences, even if the previous observable sequence terminated exceptionally. /// /// The type of the elements in the source sequences. /// Observable sequences to concatenate. /// An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. /// is null. public static IObservable OnErrorResumeNext(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.OnErrorResumeNext(sources); } /// /// Concatenates all observable sequences in the given enumerable sequence, even if the previous observable sequence terminated exceptionally. /// /// The type of the elements in the source sequences. /// Observable sequences to concatenate. /// An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. /// is null. public static IObservable OnErrorResumeNext(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.OnErrorResumeNext(sources); } #endregion #region + SkipUntil + /// /// Returns the elements from the source observable sequence only after the other observable sequence produces an element. /// /// The type of the elements in the source sequence. /// The type of the elements in the other sequence that indicates the end of skip behavior. /// Source sequence to propagate elements for. /// Observable sequence that triggers propagation of elements of the source sequence. /// An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. /// or is null. public static IObservable SkipUntil(this IObservable source, IObservable other) { if (source == null) throw new ArgumentNullException("source"); if (other == null) throw new ArgumentNullException("other"); return s_impl.SkipUntil(source, other); } #endregion #region + Switch + /// /// Switches between the inner observable sequences such that the resulting sequence always produces elements from the most recently received inner observable sequence. /// Each time a new inner observable sequence is received, the previous inner observable sequence is unsubscribed from. /// /// The type of the elements in the source sequences. /// Observable sequence of inner observable sequences. /// The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. /// is null. public static IObservable Switch(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Switch(sources); } #if !NO_TPL /// /// Switches between the tasks such that the resulting sequence always produces results from the most recently received task. /// Each time a new task is received, the previous task's result is ignored. /// /// The type of the results produced by the source tasks. /// Observable sequence of tasks. /// The observable sequence that at any point in time produces the result of the most recent task that has been received. /// is null. /// If the tasks support cancellation, consider manual conversion of the tasks using , followed by a switch operation using . public static IObservable Switch(this IObservable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Switch(sources); } #endif #endregion #region + TakeUntil + /// /// Returns the elements from the source observable sequence until the other observable sequence produces an element. /// /// The type of the elements in the source sequence. /// The type of the elements in the other sequence that indicates the end of take behavior. /// Source sequence to propagate elements for. /// Observable sequence that terminates propagation of elements of the source sequence. /// An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. /// or is null. public static IObservable TakeUntil(this IObservable source, IObservable other) { if (source == null) throw new ArgumentNullException("source"); if (other == null) throw new ArgumentNullException("other"); return s_impl.TakeUntil(source, other); } #endregion #region Window /// /// Projects each element of an observable sequence into consecutive non-overlapping windows. /// /// The type of the elements in the source sequence, and in the windows in the result sequence. /// The type of the elements in the sequences indicating window closing events. /// Source sequence to produce windows over. /// A function invoked to define the boundaries of the produced windows. A new window is started when the previous one is closed. /// An observable sequence of windows. /// or is null. public static IObservable> Window(this IObservable source, Func> windowClosingSelector) { if (source == null) throw new ArgumentNullException("source"); if (windowClosingSelector == null) throw new ArgumentNullException("windowClosingSelector"); return s_impl.Window(source, windowClosingSelector); } /// /// Projects each element of an observable sequence into zero or more windows. /// /// The type of the elements in the source sequence, and in the windows in the result sequence. /// 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. /// The type of the elements in the sequences indicating window closing events. /// Source sequence to produce windows over. /// Observable sequence whose elements denote the creation of new windows. /// A function invoked to define the closing of each produced window. /// An observable sequence of windows. /// or or is null. public static IObservable> Window(this IObservable source, IObservable windowOpenings, Func> windowClosingSelector) { if (source == null) throw new ArgumentNullException("source"); if (windowOpenings == null) throw new ArgumentNullException("windowOpenings"); if (windowClosingSelector == null) throw new ArgumentNullException("windowClosingSelector"); return s_impl.Window(source, windowOpenings, windowClosingSelector); } /// /// Projects each element of an observable sequence into consecutive non-overlapping windows. /// /// The type of the elements in the source sequence, and in the windows in the result sequence. /// The type of the elements in the sequences indicating window boundary events. /// Source sequence to produce windows over. /// Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker. /// An observable sequence of windows. /// or is null. public static IObservable> Window(this IObservable source, IObservable windowBoundaries) { if (source == null) throw new ArgumentNullException("source"); if (windowBoundaries == null) throw new ArgumentNullException("windowBoundaries"); return s_impl.Window(source, windowBoundaries); } #endregion #region + Zip + /// /// Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Function to invoke for each consecutive pair of elements from the first and second source. /// An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. /// or or is null. public static IObservable Zip(this IObservable first, IObservable second, Func resultSelector) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(first, second, resultSelector); } #if !NO_PERF /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */ #region Zip auto-generated code (8/3/2012 6:37:02 PM) /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, resultSelector); } #if !NO_LARGEARITY /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Fifteenth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, IObservable source15, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (source15 == null) throw new ArgumentNullException("source15"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector); } /// /// 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. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. /// The type of the elements in the sixteenth source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second observable source. /// Third observable source. /// Fourth observable source. /// Fifth observable source. /// Sixth observable source. /// Seventh observable source. /// Eighth observable source. /// Ninth observable source. /// Tenth observable source. /// Eleventh observable source. /// Twelfth observable source. /// Thirteenth observable source. /// Fourteenth observable source. /// Fifteenth observable source. /// Sixteenth observable source. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or or or or or or or or or or or or or or or or is null. public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8, IObservable source9, IObservable source10, IObservable source11, IObservable source12, IObservable source13, IObservable source14, IObservable source15, IObservable source16, Func resultSelector) { if (source1 == null) throw new ArgumentNullException("source1"); if (source2 == null) throw new ArgumentNullException("source2"); if (source3 == null) throw new ArgumentNullException("source3"); if (source4 == null) throw new ArgumentNullException("source4"); if (source5 == null) throw new ArgumentNullException("source5"); if (source6 == null) throw new ArgumentNullException("source6"); if (source7 == null) throw new ArgumentNullException("source7"); if (source8 == null) throw new ArgumentNullException("source8"); if (source9 == null) throw new ArgumentNullException("source9"); if (source10 == null) throw new ArgumentNullException("source10"); if (source11 == null) throw new ArgumentNullException("source11"); if (source12 == null) throw new ArgumentNullException("source12"); if (source13 == null) throw new ArgumentNullException("source13"); if (source14 == null) throw new ArgumentNullException("source14"); if (source15 == null) throw new ArgumentNullException("source15"); if (source16 == null) throw new ArgumentNullException("source16"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector); } #endif #endregion #endif /// /// 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. /// /// The type of the elements in the source sequences. /// The type of the elements in the result sequence, returned by the selector function. /// Observable sources. /// Function to invoke for each series of elements at corresponding indexes in the sources. /// An observable sequence containing the result of combining elements of the sources using the specified result selector function. /// or is null. public static IObservable Zip(this IEnumerable> sources, Func, TResult> resultSelector) { if (sources == null) throw new ArgumentNullException("sources"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(sources, resultSelector); } /// /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. /// /// The type of the elements in the source sequences, and in the lists in the result sequence. /// Observable sources. /// An observable sequence containing lists of elements at corresponding indexes. /// is null. public static IObservable> Zip(this IEnumerable> sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Zip(sources); } /// /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. /// /// The type of the elements in the source sequences, and in the lists in the result sequence. /// Observable sources. /// An observable sequence containing lists of elements at corresponding indexes. /// is null. public static IObservable> Zip(params IObservable[] sources) { if (sources == null) throw new ArgumentNullException("sources"); return s_impl.Zip(sources); } /// /// Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function. /// /// The type of the elements in the first observable source sequence. /// The type of the elements in the second enumerable source sequence. /// The type of the elements in the result sequence, returned by the selector function. /// First observable source. /// Second enumerable source. /// Function to invoke for each consecutive pair of elements from the first and second source. /// An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. /// or or is null. public static IObservable Zip(this IObservable first, IEnumerable second, Func resultSelector) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); if (resultSelector == null) throw new ArgumentNullException("resultSelector"); return s_impl.Zip(first, second, resultSelector); } #endregion } }