Skip to content

})} },System.Int32)} })} ,ReactiveUI.Extensions.Async.IObservableAsync{--0})}

ObservableAsync.Merge(IObservableAsync>) method

Defined in

Type: ObservableAsync Namespace: ReactiveUI.Extensions.Async Assembly: ReactiveUI.Extensions.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Overloads

  • 1. public static IObservableAsync<T> Merge<T>(this IObservableAsync<IObservableAsync<T>> @this)
  • 2. public static IObservableAsync<T> Merge<T>(this IObservableAsync<IObservableAsync<T>> @this, int maxConcurrent)
  • 3. public static IObservableAsync<T> Merge<T>(this IEnumerable<IObservableAsync<T>> @this)
  • 4. public static IObservableAsync<T> Merge<T>(this IObservableAsync<T> @this, IObservableAsync<T> other)

1. Overload

public static IObservableAsync<T> Merge<T>(this IObservableAsync<IObservableAsync<T>> @this)

View source

Summary: Merges multiple asynchronous observable sequences into a single observable sequence that emits items from all inner sequences as they arrive.

Type parameters

NameDescription
TThe type of the elements emitted by the inner observable sequences.

Parameters

NameTypeDescription
this[IObservableAsync>](#The source asynchronous observable sequence whose elements are themselves observable sequences to be merged. Cannot be null.

Returns: IObservableAsync -- An asynchronous observable sequence that emits items from all inner observable sequences as they are produced.

Remarks

The resulting sequence emits items from all inner sequences concurrently as they become available. The merged sequence completes when the source sequence and all inner sequences have completed. If any inner sequence signals an error, the merged sequence will propagate that error and terminate.

2. Overload

public static IObservableAsync<T> Merge<T>(this IObservableAsync<IObservableAsync<T>> @this, int maxConcurrent)

View source

Summary: Merges the emissions of multiple asynchronous observable sequences into a single observable sequence, limiting the number of concurrent subscriptions.

Type parameters

NameDescription
TThe type of the elements emitted by the inner observable sequences.

Parameters

NameTypeDescription
this[IObservableAsync>](#The source observable sequence whose elements are themselves observable sequences to be merged.
maxConcurrentintThe maximum number of inner observable sequences to subscribe to concurrently. Must be greater than zero.

Returns: IObservableAsync -- An observable sequence that emits the items from the merged inner observable sequences, with at most the specified number of concurrent subscriptions.

Remarks

If the number of active inner subscriptions reaches the specified maximum, additional inner sequences are queued and subscribed to as others complete. The resulting sequence completes when all inner sequences have completed. If the source or any inner observable sequence signals an error, the resulting sequence will propagate that error and terminate.

3. Overload

public static IObservableAsync<T> Merge<T>(this IEnumerable<IObservableAsync<T>> @this)

View source

Summary: Combines multiple asynchronous observable sequences into a single observable sequence that emits items from all source sequences as they arrive.

Type parameters

NameDescription
TThe type of the elements produced by the observable sequences.

Parameters

NameTypeDescription
thisIEnumerable>A collection of asynchronous observable sequences to be merged.

Returns: IObservableAsync -- An observable sequence that emits items from all input sequences as they are produced.

Remarks

The resulting observable sequence emits items from all source sequences in the order they arrive, interleaving emissions if sources produce items concurrently. The merged sequence completes when all source sequences have completed. If any source sequence signals an error, the merged sequence will propagate that error and terminate.

4. Overload

public static IObservableAsync<T> Merge<T>(this IObservableAsync<T> @this, IObservableAsync<T> other)

View source

Summary: Combines the elements of two asynchronous observable sequences into a single sequence by merging their emissions.

Type parameters

NameDescription
TThe type of the elements in the observable sequences.

Parameters

NameTypeDescription
this[IObservableAsync](#The first asynchronous observable sequence to merge.
other[IObservableAsync](#The second asynchronous observable sequence to merge with the first.

Returns: IObservableAsync -- An ObservableAsync that emits the elements from both input sequences as they arrive.

Remarks

The resulting sequence emits items from both source sequences in the order they are produced. The merged sequence completes when both input sequences have completed. If either source sequence signals an error, the merged sequence will propagate that error and terminate.