Skip to content

,System.Collections.Generic.IEnumerable{--1})} ,System.IObservable{--1})} ,System.IObservable{--1},System.IObservable{--2})} ,System.IObservable{--1},System.IObservable{--2},System.IObservable{--3})} ,System.IObservable{--1},System.IObservable{--2},System.IObservable{--3},System.IObservable{--4})} ,System.IObservable{--1},System.IObservable{--2},System.IObservable{--3},System.IObservable{--4},System.IObservable{--5})} ,System.IObservable{--1},System.IObservable{--2},System.IObservable{--3},System.IObservable{--4},System.IObservable{--5},System.IObservable{--6})} ,System.IObservable{--1},System.IObservable{--2},System.IObservable{--3},System.IObservable{--4},System.IObservable{--5},System.IObservable{--6},System.IObservable{--7})}

ObservableEx.Zip(IObservable, IEnumerable) method

Defined in

Type: ObservableEx Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(this IObservable<TFirst> first, IEnumerable<TSecond> second)
  • 2. public static IObservable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(this IObservable<TFirst> first, IObservable<TSecond> second)
  • 3. public static IObservable<(TFirst First, TSecond Second, TThird Third)> Zip<TFirst, TSecond, TThird>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third)
  • 4. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> Zip<TFirst, TSecond, TThird, TFourth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth)
  • 5. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth)
  • 6. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth)
  • 7. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh)
  • 8. public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh, IObservable<TEighth> eighth)

1. Overload

public static IObservable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(this IObservable<TFirst> first, IEnumerable<TSecond> second)

Summary: Merges an observable sequence and an enumerable sequence into one observable sequence of tuple values.

Type parameters

NameDescription
TFirstThe type of the elements in the first observable source sequence.
TSecondThe type of the elements in the second enumerable source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIEnumerableSecond enumerable source.

Returns: IObservable<(TFirst First, TSecond Second)> -- An observable sequence containing the result of pairwise combining the elements of the first and second source as a tuple value.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second is null.

2. Overload

public static IObservable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(this IObservable<TFirst> first, IObservable<TSecond> second)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.

Returns: IObservable<(TFirst First, TSecond Second)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second is null.

3. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third)> Zip<TFirst, TSecond, TThird>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third is null.

4. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> Zip<TFirst, TSecond, TThird, TFourth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.
TFourthThe type of the elements in the fourth source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.
fourthIObservableFourth observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third or fourth is null.

5. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.
TFourthThe type of the elements in the fourth source sequence.
TFifthThe type of the elements in the fifth source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.
fourthIObservableFourth observable source.
fifthIObservableFifth observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third or fourth or fifth is null.

6. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.
TFourthThe type of the elements in the fourth source sequence.
TFifthThe type of the elements in the fifth source sequence.
TSixthThe type of the elements in the sixth source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.
fourthIObservableFourth observable source.
fifthIObservableFifth observable source.
sixthIObservableSixth observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third or fourth or fifth or sixth is null.

7. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.
TFourthThe type of the elements in the fourth source sequence.
TFifthThe type of the elements in the fifth source sequence.
TSixthThe type of the elements in the sixth source sequence.
TSeventhThe type of the elements in the seventh source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.
fourthIObservableFourth observable source.
fifthIObservableFifth observable source.
sixthIObservableSixth observable source.
seventhIObservableSeventh observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third or fourth or fifth or sixth or seventh is null.

8. Overload

public static IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth>(this IObservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh, IObservable<TEighth> eighth)

Summary: 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.

Type parameters

NameDescription
TFirstThe type of the elements in the first source sequence.
TSecondThe type of the elements in the second source sequence.
TThirdThe type of the elements in the third source sequence.
TFourthThe type of the elements in the fourth source sequence.
TFifthThe type of the elements in the fifth source sequence.
TSixthThe type of the elements in the sixth source sequence.
TSeventhThe type of the elements in the seventh source sequence.
TEighthThe type of the elements in the eighth source sequence.

Parameters

NameTypeDescription
firstIObservableFirst observable source.
secondIObservableSecond observable source.
thirdIObservableThird observable source.
fourthIObservableFourth observable source.
fifthIObservableFifth observable source.
sixthIObservableSixth observable source.
seventhIObservableSeventh observable source.
eighthIObservableEighth observable source.

Returns: IObservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)> -- An observable sequence containing the result of combining elements of the sources using tuple values.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or third or fourth or fifth or sixth or seventh or eighth is null.