Skip to content

>,System.IObservable{--1},System.Func{--0,--1,--2})} [])}

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<TResult> ForkJoin<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
  • 2. public static IObservable<TSource[]> ForkJoin<TSource>(params IObservable<TSource>[] sources)
  • 3. public static IObservable<TSource[]> ForkJoin<TSource>(this IEnumerable<IObservable<TSource>> sources)

1. Overload

Attributes: [Experimental]

public static IObservable<TResult> ForkJoin<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)

Summary: Runs two observable sequences in parallel and combines their last elements.

Type parameters

NameDescription
TSource1The type of the elements in the first source sequence.
TSource2The type of the elements in the second source sequence.
TResultThe type of the elements in the result sequence, returned by the selector function.

Parameters

NameTypeDescription
firstIObservableFirst observable sequence.
secondIObservableSecond observable sequence.
resultSelectorFuncResult selector function to invoke with the last elements of both sequences.

Returns: IObservable -- An observable sequence with the result of calling the selector function with the last elements of both input sequences.

Exceptions

TypeCondition
System.ArgumentNullExceptionfirst or second or resultSelector is null.

2. Overload

Attributes: [Experimental]

public static IObservable<TSource[]> ForkJoin<TSource>(params IObservable<TSource>[] sources)

Summary: Runs all specified observable sequences in parallel and collects their last elements.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequences.

Parameters

NameTypeDescription
params sourcesIObservable<TSource>[]Observable sequence to collect the last elements for.

Returns: IObservable -- An observable sequence with an array collecting the last elements of all the input sequences.

Exceptions

TypeCondition
System.ArgumentNullExceptionsources is null.

3. Overload

Attributes: [Experimental]

public static IObservable<TSource[]> ForkJoin<TSource>(this IEnumerable<IObservable<TSource>> sources)

Summary: Runs all observable sequences in the enumerable sources sequence in parallel and collect their last elements.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequences.

Parameters

NameTypeDescription
sourcesIEnumerable>Observable sequence to collect the last elements for.

Returns: IObservable -- An observable sequence with an array collecting the last elements of all the input sequences.

Exceptions

TypeCondition
System.ArgumentNullExceptionsources is null.