From c5902305c4e46206b2ea2a0b54f216ad6eddd382 Mon Sep 17 00:00:00 2001 From: Bart De Smet Date: Mon, 5 Oct 2020 14:32:34 -0700 Subject: [PATCH 1/3] N-ary combining operators with tuples. --- .../Linq/IQueryLanguage.NAry.cs | 25 +- .../Linq/IQueryLanguage.NAry.tt | 35 +- .../System.Reactive/Linq/IQueryLanguageEx.cs | 6 +- .../Linq/Observable.Multiple.CombineLatest.cs | 151 +- .../Linq/Observable.Multiple.CombineLatest.tt | 51 +- .../Linq/Observable.Multiple.Zip.cs | 151 +- .../Linq/Observable.Multiple.Zip.tt | 51 +- .../Linq/Observable.Multiple.cs | 52 + .../src/System.Reactive/Linq/ObservableEx.cs | 2 +- .../Linq/QbservableEx.Generated.cs | 60 + .../System.Reactive/Linq/QbservableEx.NAry.cs | 1967 +++++++++++++++++ .../System.Reactive/Linq/QbservableEx.NAry.tt | 164 ++ .../QueryLanguage.Multiple.CombineLatest.cs | 46 +- .../QueryLanguage.Multiple.CombineLatest.tt | 30 +- .../Linq/QueryLanguage.Multiple.Zip.cs | 47 +- .../Linq/QueryLanguage.Multiple.Zip.tt | 32 +- .../System.Reactive/Linq/QueryLanguageEx.cs | 22 +- .../System.Reactive/System.Reactive.csproj | 14 + 18 files changed, 2853 insertions(+), 53 deletions(-) create mode 100644 Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs create mode 100644 Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt diff --git a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.cs b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.cs index aa1f966ea2..00a4f7505d 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. +// This code was generated by a T4 template at 10/05/2020 14:25:54. + namespace System.Reactive.Linq { partial interface IQueryLanguage { - /* The following code is generated by a T4 template. */ - - #region CombineLatest and Zip auto-generated code (10/02/2020 11:15:29) - IObservable CombineLatest(IObservable source1, IObservable source2, Func resultSelector); IObservable CombineLatest(IObservable source1, IObservable source2, IObservable source3, Func resultSelector); IObservable CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, Func resultSelector); @@ -41,7 +39,24 @@ partial interface IQueryLanguage IObservable Zip(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); IObservable Zip(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); IObservable Zip(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); + } + + partial interface IQueryLanguageEx + { + IObservable<(T1, T2)> CombineLatest(IObservable source1, IObservable source2); + IObservable<(T1, T2, T3)> CombineLatest(IObservable source1, IObservable source2, IObservable source3); + IObservable<(T1, T2, T3, T4)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4); + IObservable<(T1, T2, T3, T4, T5)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5); + IObservable<(T1, T2, T3, T4, T5, T6)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6); + IObservable<(T1, T2, T3, T4, T5, T6, T7)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7); + IObservable<(T1, T2, T3, T4, T5, T6, T7, T8)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8); - #endregion + IObservable<(T1, T2)> Zip(IObservable source1, IObservable source2); + IObservable<(T1, T2, T3)> Zip(IObservable source1, IObservable source2, IObservable source3); + IObservable<(T1, T2, T3, T4)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4); + IObservable<(T1, T2, T3, T4, T5)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5); + IObservable<(T1, T2, T3, T4, T5, T6)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6); + IObservable<(T1, T2, T3, T4, T5, T6, T7)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7); + IObservable<(T1, T2, T3, T4, T5, T6, T7, T8)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8); } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.tt b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.tt index 54544ab412..2891214cd4 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguage.NAry.tt @@ -8,14 +8,12 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + namespace System.Reactive.Linq { partial interface IQueryLanguage { - /* The following code is generated by a T4 template. */ - - #region CombineLatest and Zip auto-generated code (<#=DateTime.Now#>) - <# for (int i = 2; i <= 16; i++) { @@ -39,7 +37,34 @@ for (int i = 2; i <= 16; i++) <# } #> + } + + partial interface IQueryLanguageEx + { +<# +for (int i = 2; i <= 8; i++) +{ + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + j)); + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable source" + j)); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + j)) + ")"; + +#> + IObservable<<#=tuple#>> CombineLatest<<#=genArgs#>>(<#=parameters#>); +<# +} +#> + +<# +for (int i = 2; i <= 8; i++) +{ + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + j)); + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable source" + j)); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + j)) + ")"; - #endregion +#> + IObservable<<#=tuple#>> Zip<<#=genArgs#>>(<#=parameters#>); +<# +} +#> } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguageEx.cs b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguageEx.cs index 7d19e4c9e4..100068a192 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguageEx.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/IQueryLanguageEx.cs @@ -10,7 +10,7 @@ namespace System.Reactive.Linq /// /// Internal interface describing the LINQ to Events query language. /// - internal interface IQueryLanguageEx + internal partial interface IQueryLanguageEx { IObservable Create(Func, IEnumerable>> iteratorMethod); IObservable Create(Func>> iteratorMethod); @@ -28,5 +28,9 @@ internal interface IQueryLanguageEx IObservable ManySelect(IObservable source, Func, TResult> selector, IScheduler scheduler); ListObservable ToListObservable(IObservable source); + + IObservable<(TFirst First, TSecond Second)> WithLatestFrom(IObservable first, IObservable second); + + IObservable<(TFirst First, TSecond Second)> Zip(IObservable first, IEnumerable second); } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs index 0a4ae311cc..7ba69ba7b2 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. +// This code was generated by a T4 template at 10/05/2020 14:25:43. + namespace System.Reactive.Linq { public static partial class Observable { - /* The following code is generated by a T4 template. */ - - #region CombineLatest auto-generated code (10/02/2020 11:11:50) - /// /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. /// @@ -1193,6 +1191,149 @@ public static IObservable CombineLatest + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or is null. + public static IObservable<(TFirst First, TSecond Second)> CombineLatest(this IObservable first, IObservable second) + { + return s_impl.CombineLatest(first, second); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third)> CombineLatest(this IObservable first, IObservable second, IObservable third) + { + return s_impl.CombineLatest(first, second, third); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth) + { + return s_impl.CombineLatest(first, second, third, fourth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) + { + return s_impl.CombineLatest(first, second, third, fourth, fifth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) + { + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) + { + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// Eighth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) + { + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt index 5ff80e8363..fd6b3ae593 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt @@ -8,14 +8,12 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + namespace System.Reactive.Linq { public static partial class Observable { - /* The following code is generated by a T4 template. */ - - #region CombineLatest auto-generated code (<#=DateTime.Now#>) - <# Func toUpper = s => char.ToUpper(s[0]) + s.Substring(1); @@ -78,6 +76,49 @@ for (int j = 0; j < i; j++) <# } #> - #endregion + } + + public static partial class ObservableEx + { +<# +for (int i = 2; i <= 8; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable " + ordinals[j - 1])); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]))); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => ordinals[j - 1])); + var paramRefs = string.Join(" or ", Enumerable.Range(1, i).Select(j => "")); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]) + " " + toUpper(ordinals[j - 1]))) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + +#> + /// + /// Merges the specified observable sequences into one observable sequence of tuple values whenever any of the observable sequences produces an element. + /// +<# +for (int j = 0; j < i; j++) +{ +#> + /// The type of the elements in the <#=ordinals[j]#> source sequence. +<# +} +#> +<# +for (int j = 0; j < i; j++) +{ +#> + /// <#=toUpper(ordinals[j])#> observable source. +<# +} +#> + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// <#=paramRefs#> is null. + public static IObservable<<#=tuple#>> CombineLatest<<#=genArgs#>>(this <#=parameters#>) + { + return s_impl.CombineLatest(<#=sources#>); + } + +<# +} +#> } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs index abf60abfda..350359b570 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. +// This code was generated by a T4 template at 10/05/2020 14:25:34. + namespace System.Reactive.Linq { public static partial class Observable { - /* The following code is generated by a T4 template. */ - - #region Zip auto-generated code (10/02/2020 11:11:42) - /// /// 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. /// @@ -1179,6 +1177,149 @@ public static IObservable Zip + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or is null. + public static IObservable<(TFirst First, TSecond Second)> Zip(this IObservable first, IObservable second) + { + return s_impl.Zip(first, second); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third)> Zip(this IObservable first, IObservable second, IObservable third) + { + return s_impl.Zip(first, second, third); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth) + { + return s_impl.Zip(first, second, third, fourth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) + { + return s_impl.Zip(first, second, third, fourth, fifth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) + { + return s_impl.Zip(first, second, third, fourth, fifth, sixth); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) + { + return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// Eighth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or is null. + public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) + { + return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh, eighth); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt index 5d6ffc7786..170a9af70b 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt @@ -8,14 +8,12 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + namespace System.Reactive.Linq { public static partial class Observable { - /* The following code is generated by a T4 template. */ - - #region Zip auto-generated code (<#=DateTime.Now#>) - <# Func toUpper = s => char.ToUpper(s[0]) + s.Substring(1); @@ -77,6 +75,49 @@ for (int j = 0; j < i; j++) <# } #> - #endregion + } + + public static partial class ObservableEx + { +<# +for (int i = 2; i <= 8; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable " + ordinals[j - 1])); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]))); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => ordinals[j - 1])); + var paramRefs = string.Join(" or ", Enumerable.Range(1, i).Select(j => "")); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]) + " " + toUpper(ordinals[j - 1]))) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + +#> + /// + /// Merges the specified observable sequences into one observable sequence of tuple values whenever all of the observable sequences have produced an element at a corresponding index. + /// +<# +for (int j = 0; j < i; j++) +{ +#> + /// The type of the elements in the <#=ordinals[j]#> source sequence. +<# +} +#> +<# +for (int j = 0; j < i; j++) +{ +#> + /// <#=toUpper(ordinals[j])#> observable source. +<# +} +#> + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// <#=paramRefs#> is null. + public static IObservable<<#=tuple#>> Zip<<#=genArgs#>>(this <#=parameters#>) + { + return s_impl.Zip(<#=sources#>); + } + +<# +} +#> } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.cs b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.cs index 1454d7bc4b..b0cbb3642b 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Configuration; using System.Reactive.Concurrency; using System.Threading; using System.Threading.Tasks; @@ -1126,4 +1127,55 @@ public static IObservable Zip(this IObserv #endregion } + + public static partial class ObservableEx + { + /// + /// Merges two observable sequences into one observable sequence by combining each element from the first source with the latest element from the second source, if any. + /// + /// The type of the elements in the first source sequence. + /// The type of the elements in the second source sequence. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining each element of the first source with the latest element from the second source, if any, as a tuple value. + /// or is null. + public static IObservable<(TFirst First, TSecond Second)> WithLatestFrom(this IObservable first, IObservable second) + { + if (first == null) + { + throw new ArgumentNullException(nameof(first)); + } + + if (second == null) + { + throw new ArgumentNullException(nameof(second)); + } + + return s_impl.WithLatestFrom(first, second); + } + + /// + /// Merges an observable sequence and an enumerable sequence into one observable sequence of tuple values. + /// + /// The type of the elements in the first observable source sequence. + /// The type of the elements in the second enumerable source sequence. + /// First observable source. + /// Second enumerable source. + /// An observable sequence containing the result of pairwise combining the elements of the first and second source as a tuple value. + /// or is null. + public static IObservable<(TFirst First, TSecond Second)> Zip(this IObservable first, IEnumerable second) + { + if (first == null) + { + throw new ArgumentNullException(nameof(first)); + } + + if (second == null) + { + throw new ArgumentNullException(nameof(second)); + } + + return s_impl.Zip(first, second); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/ObservableEx.cs b/Rx.NET/Source/src/System.Reactive/Linq/ObservableEx.cs index 3cc20565a5..5da63f8805 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/ObservableEx.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/ObservableEx.cs @@ -10,7 +10,7 @@ namespace System.Reactive.Linq /// /// Provides a set of static methods for writing in-memory queries over observable sequences. /// - public static class ObservableEx + public static partial class ObservableEx { #pragma warning disable IDE1006 // Naming Styles: 3rd party code is known to reflect for this specific field name private static IQueryLanguageEx s_impl = QueryServices.GetQueryImpl(new QueryLanguageEx()); diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs index 90c1ebb060..73842189d1 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs @@ -348,6 +348,66 @@ public static IQbservable ManySelect(this IQbservable } #endif + /// + /// Merges two observable sequences into one observable sequence by combining each element from the first source with the latest element from the second source, if any. + /// + /// The type of the elements in the first source sequence. + /// The type of the elements in the second source sequence. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining each element of the first source with the latest element from the second source, if any, as a tuple value. + /// or is null. + public static IQbservable<(TFirst First, TSecond Second)> WithLatestFrom(this IQbservable first, IObservable second) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => QbservableEx.WithLatestFrom(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond)), +#endif + first.Expression, + GetSourceExpression(second) + ) + ); + } + + /// + /// Merges an observable sequence and an enumerable sequence into one observable sequence of tuple values. + /// + /// The type of the elements in the first observable source sequence. + /// The type of the elements in the second enumerable source sequence. + /// First observable source. + /// Second enumerable source. + /// An observable sequence containing the result of pairwise combining the elements of the first and second source as a tuple value. + /// or is null. + public static IQbservable<(TFirst First, TSecond Second)> Zip(this IQbservable first, IEnumerable second) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => QbservableEx.Zip(default(IQbservable), default(IEnumerable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond)), +#endif + first.Expression, + GetSourceExpression(second) + ) + ); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs new file mode 100644 index 0000000000..a771dbe059 --- /dev/null +++ b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs @@ -0,0 +1,1967 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +// This code was generated by a T4 template at 10/05/2020 14:10:15. + +using System.Linq.Expressions; +#if !CRIPPLED_REFLECTION +using System.Reflection; +#endif + +namespace System.Reactive.Linq +{ + public static partial class QbservableEx + { + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or is null. + public static IQbservable<(TFirst First, TSecond Second)> CombineLatest(this IQbservable first, IObservable second) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond)), +#endif + first.Expression, + GetSourceExpression(second) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third)> CombineLatest(this IQbservable first, IObservable second, IObservable third) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// Eighth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth, IObservable fifteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + if (fifteenth == null) + throw new ArgumentNullException(nameof(fifteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth), + GetSourceExpression(fifteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)> CombineLatest(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth, IObservable fifteenth, IObservable sixteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + if (fifteenth == null) + throw new ArgumentNullException(nameof(fifteenth)); + if (sixteenth == null) + throw new ArgumentNullException(nameof(sixteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth), typeof(TSixteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth), + GetSourceExpression(fifteenth), + GetSourceExpression(sixteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or is null. + public static IQbservable<(TFirst First, TSecond Second)> Zip(this IQbservable first, IObservable second) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond)), +#endif + first.Expression, + GetSourceExpression(second) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third)> Zip(this IQbservable first, IObservable second, IObservable third) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// First observable source. + /// Second observable source. + /// Third observable source. + /// Fourth observable source. + /// Fifth observable source. + /// Sixth observable source. + /// Seventh observable source. + /// Eighth observable source. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth, IObservable fifteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + if (fifteenth == null) + throw new ArgumentNullException(nameof(fifteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth), + GetSourceExpression(fifteenth) + ) + ); + } + + /// + /// Merges the specified observable sequences into one observable sequence of tuple values 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. + /// 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. + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// or or or or or or or or or or or or or or or is null. + public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)> Zip(this IQbservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth, IObservable ninth, IObservable tenth, IObservable eleventh, IObservable twelfth, IObservable thirteenth, IObservable fourteenth, IObservable fifteenth, IObservable sixteenth) + { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + if (ninth == null) + throw new ArgumentNullException(nameof(ninth)); + if (tenth == null) + throw new ArgumentNullException(nameof(tenth)); + if (eleventh == null) + throw new ArgumentNullException(nameof(eleventh)); + if (twelfth == null) + throw new ArgumentNullException(nameof(twelfth)); + if (thirteenth == null) + throw new ArgumentNullException(nameof(thirteenth)); + if (fourteenth == null) + throw new ArgumentNullException(nameof(fourteenth)); + if (fifteenth == null) + throw new ArgumentNullException(nameof(fifteenth)); + if (sixteenth == null) + throw new ArgumentNullException(nameof(sixteenth)); + + return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth), typeof(TSixteenth)), +#endif + first.Expression, + GetSourceExpression(second), + GetSourceExpression(third), + GetSourceExpression(fourth), + GetSourceExpression(fifth), + GetSourceExpression(sixth), + GetSourceExpression(seventh), + GetSourceExpression(eighth), + GetSourceExpression(ninth), + GetSourceExpression(tenth), + GetSourceExpression(eleventh), + GetSourceExpression(twelfth), + GetSourceExpression(thirteenth), + GetSourceExpression(fourteenth), + GetSourceExpression(fifteenth), + GetSourceExpression(sixteenth) + ) + ); + } + + } +} diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt new file mode 100644 index 0000000000..2d87f707ee --- /dev/null +++ b/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt @@ -0,0 +1,164 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + +using System.Linq.Expressions; +#if !CRIPPLED_REFLECTION +using System.Reflection; +#endif + +namespace System.Reactive.Linq +{ + public static partial class QbservableEx + { +<# +Func toUpper = s => char.ToUpper(s[0]) + s.Substring(1); + +string[] ordinals = new[] { "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth" }; + +for (int i = 2; i <= 16; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "I" + (j == 1 ? "Q" : "O") + "bservable " + ordinals[j - 1])); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]))); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => ordinals[j - 1])); + var paramRefs = string.Join(" or ", Enumerable.Range(1, i).Select(j => "")); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]) + " " + toUpper(ordinals[j - 1]))) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + var typeofGenArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "typeof(T" + toUpper(ordinals[j - 1]) + ")")); + +#> + /// + /// Merges the specified observable sequences into one observable sequence of tuple values whenever any of the observable sequences produces an element. + /// +<# +for (int j = 0; j < i; j++) +{ +#> + /// The type of the elements in the <#=ordinals[j]#> source sequence. +<# +} +#> +<# +for (int j = 0; j < i; j++) +{ +#> + /// <#=toUpper(ordinals[j])#> observable source. +<# +} +#> + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// <#=paramRefs#> is null. + public static IQbservable<<#=tuple#>> CombineLatest<<#=genArgs#>>(this <#=parameters#>) + { +<# +for (int j = 1; j <= i; j++) +{ +#> + if (<#=ordinals[j - 1]#> == null) + throw new ArgumentNullException(nameof(<#=ordinals[j - 1]#>)); +<# +} +#> + + return first.Provider.CreateQuery<<#=tuple#>>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.CombineLatest<<#=genArgs#>>(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(<#=typeofGenArgs#>), +#endif + first.Expression, +<# +for (int j = 2; j <= i; j++) +{ +#> + GetSourceExpression(<#=ordinals[j - 1]#>)<#=j != i ? "," : ""#> +<# +} +#> + ) + ); + } + +<# +} + +for (int i = 2; i <= 16; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "I" + (j == 1 ? "Q" : "O") + "bservable " + ordinals[j - 1])); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]))); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => ordinals[j - 1])); + var paramRefs = string.Join(" or ", Enumerable.Range(1, i).Select(j => "")); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "T" + toUpper(ordinals[j - 1]) + " " + toUpper(ordinals[j - 1]))) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + var typeofGenArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "typeof(T" + toUpper(ordinals[j - 1]) + ")")); + +#> + /// + /// Merges the specified observable sequences into one observable sequence of tuple values whenever all of the observable sequences have produced an element at a corresponding index. + /// +<# +for (int j = 0; j < i; j++) +{ +#> + /// The type of the elements in the <#=ordinals[j]#> source sequence. +<# +} +#> +<# +for (int j = 0; j < i; j++) +{ +#> + /// <#=toUpper(ordinals[j])#> observable source. +<# +} +#> + /// An observable sequence containing the result of combining elements of the sources using tuple values. + /// <#=paramRefs#> is null. + public static IQbservable<<#=tuple#>> Zip<<#=genArgs#>>(this <#=parameters#>) + { +<# +for (int j = 1; j <= i; j++) +{ +#> + if (<#=ordinals[j - 1]#> == null) + throw new ArgumentNullException(nameof(<#=ordinals[j - 1]#>)); +<# +} +#> + + return first.Provider.CreateQuery<<#=tuple#>>( + Expression.Call( + null, +#if CRIPPLED_REFLECTION + InfoOf(() => Qbservable.Zip<<#=genArgs#>>(default(IQbservable), default(IObservable))), +#else + ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(<#=typeofGenArgs#>), +#endif + first.Expression, +<# +for (int j = 2; j <= i; j++) +{ +#> + GetSourceExpression(<#=ordinals[j - 1]#>)<#=j != i ? "," : ""#> +<# +} +#> + ) + ); + } + +<# +} +#> + } +} diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.cs b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.cs index 084585c7d4..fe204bb08a 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. +// This code was generated by a T4 template at 10/05/2020 14:25:15. + namespace System.Reactive.Linq { using ObservableImpl; internal partial class QueryLanguage { - /* The following code is generated by a T4 template. */ - - #region CombineLatest auto-generated code (10/02/2020 11:12:00) - public virtual IObservable CombineLatest(IObservable source1, IObservable source2, IObservable source3, Func resultSelector) { return new CombineLatest(source1, source2, source3, resultSelector); @@ -82,6 +80,44 @@ public virtual IObservable CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector); } - #endregion + } + + internal partial class QueryLanguageEx + { + public virtual IObservable<(TSource1, TSource2)> CombineLatest(IObservable source1, IObservable source2) + { + return new CombineLatest(source1, source2, (t1, t2) => (t1, t2)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3)> CombineLatest(IObservable source1, IObservable source2, IObservable source3) + { + return new CombineLatest(source1, source2, source3, (t1, t2, t3) => (t1, t2, t3)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4) + { + return new CombineLatest(source1, source2, source3, source4, (t1, t2, t3, t4) => (t1, t2, t3, t4)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5) + { + return new CombineLatest(source1, source2, source3, source4, source5, (t1, t2, t3, t4, t5) => (t1, t2, t3, t4, t5)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6) + { + return new CombineLatest(source1, source2, source3, source4, source5, source6, (t1, t2, t3, t4, t5, t6) => (t1, t2, t3, t4, t5, t6)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7) + { + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, (t1, t2, t3, t4, t5, t6, t7) => (t1, t2, t3, t4, t5, t6, t7)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8)> CombineLatest(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8) + { + return new CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, (t1, t2, t3, t4, t5, t6, t7, t8) => (t1, t2, t3, t4, t5, t6, t7, t8)); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.tt b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.tt index d1cfa3cbe1..b7f2016add 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.CombineLatest.tt @@ -8,16 +8,14 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + namespace System.Reactive.Linq { using ObservableImpl; internal partial class QueryLanguage { - /* The following code is generated by a T4 template. */ - - #region CombineLatest auto-generated code (<#=DateTime.Now#>) - <# for (int i = 3; i <= 16; i++) { @@ -34,6 +32,28 @@ for (int i = 3; i <= 16; i++) <# } #> - #endregion + } + + internal partial class QueryLanguageEx + { +<# +for (int i = 2; i <= 8; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable source" + j)); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "TSource" + j)); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => "source" + j)); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "TSource" + j)) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + var selector = "(" + vals + ") => (" + vals + ")"; + +#> + public virtual IObservable<<#=tuple#>> CombineLatest<<#=genArgs#>>(<#=parameters#>) + { + return new CombineLatest<<#=genArgs#>, <#=tuple#>>(<#=sources#>, <#=selector#>); + } + +<# +} +#> } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.cs b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.cs index b6f04d597d..1adad4fe1b 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. +// This code was generated by a T4 template at 10/05/2020 14:25:21. + namespace System.Reactive.Linq { using ObservableImpl; internal partial class QueryLanguage { - /* The following code is generated by a T4 template. */ - - #region Zip auto-generated code (10/02/2020 11:12:08) - public virtual IObservable Zip(IObservable source1, IObservable source2, IObservable source3, Func resultSelector) { return new Zip(source1, source2, source3, resultSelector); @@ -82,6 +80,45 @@ public virtual IObservable Zip(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector); } - #endregion + } + + + internal partial class QueryLanguageEx + { + public virtual IObservable<(TSource1, TSource2)> Zip(IObservable source1, IObservable source2) + { + return new Zip.Observable(source1, source2, (t1, t2) => (t1, t2)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3)> Zip(IObservable source1, IObservable source2, IObservable source3) + { + return new Zip(source1, source2, source3, (t1, t2, t3) => (t1, t2, t3)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4) + { + return new Zip(source1, source2, source3, source4, (t1, t2, t3, t4) => (t1, t2, t3, t4)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5) + { + return new Zip(source1, source2, source3, source4, source5, (t1, t2, t3, t4, t5) => (t1, t2, t3, t4, t5)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6) + { + return new Zip(source1, source2, source3, source4, source5, source6, (t1, t2, t3, t4, t5, t6) => (t1, t2, t3, t4, t5, t6)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7) + { + return new Zip(source1, source2, source3, source4, source5, source6, source7, (t1, t2, t3, t4, t5, t6, t7) => (t1, t2, t3, t4, t5, t6, t7)); + } + + public virtual IObservable<(TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8)> Zip(IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, IObservable source8) + { + return new Zip(source1, source2, source3, source4, source5, source6, source7, source8, (t1, t2, t3, t4, t5, t6, t7, t8) => (t1, t2, t3, t4, t5, t6, t7, t8)); + } + } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.tt b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.tt index 9cf199a1a9..81a739bd75 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Multiple.Zip.tt @@ -8,16 +8,14 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> +// This code was generated by a T4 template at <#=DateTime.Now#>. + namespace System.Reactive.Linq { using ObservableImpl; internal partial class QueryLanguage { - /* The following code is generated by a T4 template. */ - - #region Zip auto-generated code (<#=DateTime.Now#>) - <# for (int i = 3; i <= 16; i++) { @@ -34,6 +32,30 @@ for (int i = 3; i <= 16; i++) <# } #> - #endregion + } + + + internal partial class QueryLanguageEx + { +<# +for (int i = 2; i <= 8; i++) +{ + var parameters = string.Join(", ", Enumerable.Range(1, i).Select(j => "IObservable source" + j)); + var genArgs = string.Join(", ", Enumerable.Range(1, i).Select(j => "TSource" + j)); + var sources = string.Join(", ", Enumerable.Range(1, i).Select(j => "source" + j)); + var tuple = "(" + string.Join(", ", Enumerable.Range(1, i).Select(j => "TSource" + j)) + ")"; + var vals = string.Join(", ", Enumerable.Range(1, i).Select(j => "t" + j)); + var selector = "(" + vals + ") => (" + vals + ")"; + var extra = i == 2 ? ".Observable" : ""; + +#> + public virtual IObservable<<#=tuple#>> Zip<<#=genArgs#>>(<#=parameters#>) + { + return new Zip<<#=genArgs#>, <#=tuple#>><#=extra#>(<#=sources#>, <#=selector#>); + } + +<# +} +#> } } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguageEx.cs b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguageEx.cs index 7a6fe26b16..95c66e2e77 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguageEx.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguageEx.cs @@ -10,7 +10,9 @@ namespace System.Reactive.Linq { - internal class QueryLanguageEx : IQueryLanguageEx + using ObservableImpl; + + internal partial class QueryLanguageEx : IQueryLanguageEx { #region Create @@ -531,6 +533,24 @@ public virtual ListObservable ToListObservable(IObservable WithLatestFrom(IObservable first, IObservable second) + { + return new WithLatestFrom(first, second, (t1, t2) => (t1, t2)); + } + + #endregion + + #region Zip + + public virtual IObservable<(TFirst First, TSecond Second)> Zip(IObservable first, IEnumerable second) + { + return new Zip.Enumerable(first, second, (t1, t2) => (t1, t2)); + } + + #endregion + #region |> Helpers <| private static IObservable Combine(IObservable leftSource, IObservable rightSource, Func, IDisposable, IDisposable, IObserver, Notification>>> combinerSelector) diff --git a/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj b/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj index 5b444bddbc..733446b8fe 100644 --- a/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj +++ b/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj @@ -27,6 +27,10 @@ + + TextTemplatingFileGenerator + QbservableEx.NAry.cs + @@ -101,6 +105,11 @@ True Observable.Multiple.Zip.tt + + True + True + QbservableEx.NAry.tt + True True @@ -179,6 +188,11 @@ + + True + True + QbservableEx.NAry.tt + From 68ea39f9af90aec259e7d0af1515960ec2efe148 Mon Sep 17 00:00:00 2001 From: Bart De Smet Date: Mon, 5 Oct 2020 14:49:39 -0700 Subject: [PATCH 2/3] Fix argument validation. --- .../Linq/Observable.Multiple.CombineLatest.cs | 79 ++++++++++++++++++- .../Linq/Observable.Multiple.CombineLatest.tt | 10 +++ .../Linq/Observable.Multiple.Zip.cs | 79 ++++++++++++++++++- .../Linq/Observable.Multiple.Zip.tt | 10 +++ 4 files changed, 176 insertions(+), 2 deletions(-) diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs index 7ba69ba7b2..3945ffbdf4 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. -// This code was generated by a T4 template at 10/05/2020 14:25:43. +// This code was generated by a T4 template at 10/05/2020 14:49:21. namespace System.Reactive.Linq { @@ -1206,6 +1206,11 @@ public static partial class ObservableEx /// or is null. public static IObservable<(TFirst First, TSecond Second)> CombineLatest(this IObservable first, IObservable second) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + return s_impl.CombineLatest(first, second); } @@ -1222,6 +1227,13 @@ public static partial class ObservableEx /// or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third)> CombineLatest(this IObservable first, IObservable second, IObservable third) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + return s_impl.CombineLatest(first, second, third); } @@ -1240,6 +1252,15 @@ public static partial class ObservableEx /// or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + return s_impl.CombineLatest(first, second, third, fourth); } @@ -1260,6 +1281,17 @@ public static partial class ObservableEx /// or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + return s_impl.CombineLatest(first, second, third, fourth, fifth); } @@ -1282,6 +1314,19 @@ public static partial class ObservableEx /// or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth); } @@ -1306,6 +1351,21 @@ public static partial class ObservableEx /// or or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh); } @@ -1332,6 +1392,23 @@ public static partial class ObservableEx /// or or or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> CombineLatest(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth); } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt index fd6b3ae593..3a175af435 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.tt @@ -114,6 +114,16 @@ for (int j = 0; j < i; j++) /// <#=paramRefs#> is null. public static IObservable<<#=tuple#>> CombineLatest<<#=genArgs#>>(this <#=parameters#>) { +<# +for (int j = 0; j < i; j++) +{ +#> + if (<#=ordinals[j]#> == null) + throw new ArgumentNullException(nameof(<#=ordinals[j]#>)); +<# +} +#> + return s_impl.CombineLatest(<#=sources#>); } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs index 350359b570..e3309a3d08 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. -// This code was generated by a T4 template at 10/05/2020 14:25:34. +// This code was generated by a T4 template at 10/05/2020 14:49:15. namespace System.Reactive.Linq { @@ -1192,6 +1192,11 @@ public static partial class ObservableEx /// or is null. public static IObservable<(TFirst First, TSecond Second)> Zip(this IObservable first, IObservable second) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + return s_impl.Zip(first, second); } @@ -1208,6 +1213,13 @@ public static partial class ObservableEx /// or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third)> Zip(this IObservable first, IObservable second, IObservable third) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + return s_impl.Zip(first, second, third); } @@ -1226,6 +1238,15 @@ public static partial class ObservableEx /// or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + return s_impl.Zip(first, second, third, fourth); } @@ -1246,6 +1267,17 @@ public static partial class ObservableEx /// or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + return s_impl.Zip(first, second, third, fourth, fifth); } @@ -1268,6 +1300,19 @@ public static partial class ObservableEx /// or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + return s_impl.Zip(first, second, third, fourth, fifth, sixth); } @@ -1292,6 +1337,21 @@ public static partial class ObservableEx /// or or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh); } @@ -1318,6 +1378,23 @@ public static partial class ObservableEx /// or or or or or or or is null. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> Zip(this IObservable first, IObservable second, IObservable third, IObservable fourth, IObservable fifth, IObservable sixth, IObservable seventh, IObservable eighth) { + if (first == null) + throw new ArgumentNullException(nameof(first)); + if (second == null) + throw new ArgumentNullException(nameof(second)); + if (third == null) + throw new ArgumentNullException(nameof(third)); + if (fourth == null) + throw new ArgumentNullException(nameof(fourth)); + if (fifth == null) + throw new ArgumentNullException(nameof(fifth)); + if (sixth == null) + throw new ArgumentNullException(nameof(sixth)); + if (seventh == null) + throw new ArgumentNullException(nameof(seventh)); + if (eighth == null) + throw new ArgumentNullException(nameof(eighth)); + return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh, eighth); } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt index 170a9af70b..b070483b15 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt +++ b/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.tt @@ -113,6 +113,16 @@ for (int j = 0; j < i; j++) /// <#=paramRefs#> is null. public static IObservable<<#=tuple#>> Zip<<#=genArgs#>>(this <#=parameters#>) { +<# +for (int j = 0; j < i; j++) +{ +#> + if (<#=ordinals[j]#> == null) + throw new ArgumentNullException(nameof(<#=ordinals[j]#>)); +<# +} +#> + return s_impl.Zip(<#=sources#>); } From b0df063684f276388741c8c357f5647fe144ec6c Mon Sep 17 00:00:00 2001 From: Bart De Smet Date: Mon, 5 Oct 2020 15:01:12 -0700 Subject: [PATCH 3/3] Add approvals. --- .../Api/ApiApprovalTests.Core.verified.cs | 574 ++++++++++++++++++ 1 file changed, 574 insertions(+) diff --git a/Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Api/ApiApprovalTests.Core.verified.cs b/Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Api/ApiApprovalTests.Core.verified.cs index ad2dd848ae..576570fdbe 100644 --- a/Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Api/ApiApprovalTests.Core.verified.cs +++ b/Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Api/ApiApprovalTests.Core.verified.cs @@ -1628,6 +1628,56 @@ public static System.IObservable Zip> CombineLatest(this System.IObservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third"})] + public static System.IObservable> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth"})] + public static System.IObservable> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth"})] + public static System.IObservable> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth"})] + public static System.IObservable> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh"})] + public static System.IObservable> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + null})] + public static System.IObservable>> CombineLatest(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth) { } [System.Reactive.Experimental] public static System.IObservable Create(System.Func>> iteratorMethod) { } [System.Reactive.Experimental] @@ -1650,6 +1700,64 @@ public static System.IObservable ManySelect(this Syst public static System.IObservable ManySelect(this System.IObservable source, System.Func, TResult> selector, System.Reactive.Concurrency.IScheduler scheduler) { } [System.Reactive.Experimental] public static System.Reactive.ListObservable ToListObservable(this System.IObservable source) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.IObservable> WithLatestFrom(this System.IObservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.IObservable> Zip(this System.IObservable first, System.Collections.Generic.IEnumerable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second, System.IObservable third) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh"})] + public static System.IObservable> Zip(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + null})] + public static System.IObservable>> Zip(this System.IObservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth) { } } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public static class Qbservable @@ -2341,6 +2449,235 @@ public static System.Reactive.Linq.IQbservable Zip> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third"})] + public static System.Reactive.Linq.IQbservable> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth"})] + public static System.Reactive.Linq.IQbservable> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth"})] + public static System.Reactive.Linq.IQbservable> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth"})] + public static System.Reactive.Linq.IQbservable> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh"})] + public static System.Reactive.Linq.IQbservable> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth, System.IObservable fourteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + "Fifteenth", + null, + null, + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>>> CombineLatest(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth, System.IObservable fourteenth, System.IObservable fifteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + "Fifteenth", + "Sixteenth", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>>> CombineLatest( + this System.Reactive.Linq.IQbservable first, + System.IObservable second, + System.IObservable third, + System.IObservable fourth, + System.IObservable fifth, + System.IObservable sixth, + System.IObservable seventh, + System.IObservable eighth, + System.IObservable ninth, + System.IObservable tenth, + System.IObservable eleventh, + System.IObservable twelfth, + System.IObservable thirteenth, + System.IObservable fourteenth, + System.IObservable fifteenth, + System.IObservable sixteenth) { } [System.Reactive.Experimental] public static System.Reactive.Linq.IQbservable Create(this System.Reactive.Linq.IQbservableProvider provider, System.Linq.Expressions.Expression>>> iteratorMethod) { } [System.Reactive.Experimental] @@ -2361,6 +2698,243 @@ public static System.Reactive.Linq.IQbservable Let(th public static System.Reactive.Linq.IQbservable ManySelect(this System.Reactive.Linq.IQbservable source, System.Linq.Expressions.Expression, TResult>> selector) { } [System.Reactive.Experimental] public static System.Reactive.Linq.IQbservable ManySelect(this System.Reactive.Linq.IQbservable source, System.Linq.Expressions.Expression, TResult>> selector, System.Reactive.Concurrency.IScheduler scheduler) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.Reactive.Linq.IQbservable> WithLatestFrom(this System.Reactive.Linq.IQbservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.Collections.Generic.IEnumerable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh"})] + public static System.Reactive.Linq.IQbservable> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth, System.IObservable fourteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + "Fifteenth", + null, + null, + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>>> Zip(this System.Reactive.Linq.IQbservable first, System.IObservable second, System.IObservable third, System.IObservable fourth, System.IObservable fifth, System.IObservable sixth, System.IObservable seventh, System.IObservable eighth, System.IObservable ninth, System.IObservable tenth, System.IObservable eleventh, System.IObservable twelfth, System.IObservable thirteenth, System.IObservable fourteenth, System.IObservable fifteenth) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second", + "Third", + "Fourth", + "Fifth", + "Sixth", + "Seventh", + "Eighth", + "Ninth", + "Tenth", + "Eleventh", + "Twelfth", + "Thirteenth", + "Fourteenth", + "Fifteenth", + "Sixteenth", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null})] + public static System.Reactive.Linq.IQbservable>>> Zip( + this System.Reactive.Linq.IQbservable first, + System.IObservable second, + System.IObservable third, + System.IObservable fourth, + System.IObservable fifth, + System.IObservable sixth, + System.IObservable seventh, + System.IObservable eighth, + System.IObservable ninth, + System.IObservable tenth, + System.IObservable eleventh, + System.IObservable twelfth, + System.IObservable thirteenth, + System.IObservable fourteenth, + System.IObservable fifteenth, + System.IObservable sixteenth) { } } public class QueryDebugger {