Skip to content

,System.IObservable{--1},System.Func{--0,System.IObservable{--2}},System.Func{--1,System.IObservable{--3}},System.Func{--0,--1,--4})}

Observable.Join(IObservable, IObservable, Func>, Func>, Func) method

Defined in

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

Applies to

netstandard2.0

public static IObservable<TResult> Join<TLeft, TRight, TLeftDuration, TRightDuration, TResult>(this IObservable<TLeft> left, IObservable<TRight> right, Func<TLeft, IObservable<TLeftDuration>> leftDurationSelector, Func<TRight, IObservable<TRightDuration>> rightDurationSelector, Func<TLeft, TRight, TResult> resultSelector)

Summary: Correlates the elements of two sequences based on overlapping durations.

Type parameters

NameDescription
TLeftThe type of the elements in the left source sequence.
TRightThe type of the elements in the right source sequence.
TLeftDurationThe type of the elements in the duration sequence denoting the computed duration of each element in the left source sequence.
TRightDurationThe type of the elements in the duration sequence denoting the computed duration of each element in the right source sequence.
TResultThe type of the elements in the result sequence, obtained by invoking the result selector function for source elements with overlapping duration.

Parameters

NameTypeDescription
leftIObservableThe left observable sequence to join elements for.
rightIObservableThe right observable sequence to join elements for.
leftDurationSelectorFunc>A function to select the duration of each element of the left observable sequence, used to determine overlap.
rightDurationSelectorFunc>A function to select the duration of each element of the right observable sequence, used to determine overlap.
resultSelectorFuncA function invoked to compute a result element for any two overlapping elements of the left and right observable sequences.

Returns: IObservable -- An observable sequence that contains result elements computed from source elements that have an overlapping duration.

Exceptions

TypeCondition
System.ArgumentNullExceptionleft or right or leftDurationSelector or rightDurationSelector or resultSelector is null.