Share via


Observable.Join<TLeft, TRight, TLeftDuration, TRightDuration, TResult> Method

Correlates the elements of two sequences based on overlapping durations.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Join(Of TLeft, TRight, TLeftDuration, TRightDuration, TResult) ( _
    left As IObservable(Of TLeft), _
    right As IObservable(Of TRight), _
    leftDurationSelector As Func(Of TLeft, IObservable(Of TLeftDuration)), _
    rightDurationSelector As Func(Of TRight, IObservable(Of TRightDuration)), _
    resultSelector As Func(Of TLeft, TRight, TResult) _
) As IObservable(Of TResult)
'Usage
Dim left As IObservable(Of TLeft)
Dim right As IObservable(Of TRight)
Dim leftDurationSelector As Func(Of TLeft, IObservable(Of TLeftDuration))
Dim rightDurationSelector As Func(Of TRight, IObservable(Of TRightDuration))
Dim resultSelector As Func(Of TLeft, TRight, TResult)
Dim returnValue As IObservable(Of TResult)

returnValue = left.Join(right, leftDurationSelector, _
    rightDurationSelector, resultSelector)
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
)
[ExtensionAttribute]
public:
generic<typename TLeft, typename TRight, typename TLeftDuration, typename TRightDuration, typename TResult>
static IObservable<TResult>^ Join(
    IObservable<TLeft>^ left, 
    IObservable<TRight>^ right, 
    Func<TLeft, IObservable<TLeftDuration>^>^ leftDurationSelector, 
    Func<TRight, IObservable<TRightDuration>^>^ rightDurationSelector, 
    Func<TLeft, TRight, TResult>^ resultSelector
)
static member Join : 
        left:IObservable<'TLeft> * 
        right:IObservable<'TRight> * 
        leftDurationSelector:Func<'TLeft, IObservable<'TLeftDuration>> * 
        rightDurationSelector:Func<'TRight, IObservable<'TRightDuration>> * 
        resultSelector:Func<'TLeft, 'TRight, 'TResult> -> IObservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TLeft
    The type of left.
  • TRight
    The type of right.
  • TLeftDuration
    The type of left duration.
  • TRightDuration
    The type of right duration.
  • TResult
    The type of result.

Parameters

  • right
    Type: System.IObservable<TRight>
    The right observable sequence to join elements for.
  • leftDurationSelector
    Type: System.Func<TLeft, IObservable<TLeftDuration>>
    A function to select the duration of each element of the left observable sequence, used to determine overlap.
  • rightDurationSelector
    Type: System.Func<TRight, IObservable<TRightDuration>>
    A function to select the duration of each element of the right observable sequence, used to determine overlap.
  • resultSelector
    Type: System.Func<TLeft, TRight, TResult>
    A function invoked to compute a result element for any two overlapping elements of the left and right observable sequences.

Return Value

Type: System.IObservable<TResult>
An observable sequence that contains result elements computed from source elements that have an overlapping duration.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObservable<TLeft>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

Observable Class

System.Reactive.Linq Namespace