Skip to content

,--0)} ,System.Collections.Generic.IEnumerable{--0})}

ObservableAsync.Prepend(IObservableAsync, T) 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> Prepend<T>(this IObservableAsync<T> @this, T value)
  • 2. public static IObservableAsync<T> Prepend<T>(this IObservableAsync<T> @this, IEnumerable<T> values)

1. Overload

public static IObservableAsync<T> Prepend<T>(this IObservableAsync<T> @this, T value)

View source

Summary: Returns a new observable sequence that begins with the specified value, followed by the elements of the current sequence.

Type parameters

NameDescription
TThe type of elements in the sequence.

Parameters

NameTypeDescription
this[IObservableAsync](#The source observable sequence.
valueTThe value to prepend to the beginning of the sequence.

Returns: IObservableAsync -- An observable sequence with the specified value prepended to the original sequence.

2. Overload

public static IObservableAsync<T> Prepend<T>(this IObservableAsync<T> @this, IEnumerable<T> values)

View source

Summary: Returns a new observable sequence that emits the specified values before the emissions from the current sequence.

Type parameters

NameDescription
TThe type of elements in the sequence.

Parameters

NameTypeDescription
this[IObservableAsync](#The source observable sequence.
valuesIEnumerableThe collection of values to emit before the original sequence. Cannot be null.

Returns: IObservableAsync -- An observable sequence that emits the specified values first, followed by the items from the current sequence.

Remarks

The values in the provided collection are emitted in order before any items from the original sequence. If the sequence is unsubscribed before completion, remaining values may not be emitted.