Skip to content

)}

ObservableAsync.StatelessReplayLatestPublish(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

public static ConnectableObservableAsync<T> StatelessReplayLatestPublish<T>(this IObservableAsync<T> source)

View source

Summary: Creates a connectable observable sequence that replays only the latest item to new subscribers and publishes items to all current subscribers.

Type parameters

NameDescription
TThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IObservableAsync](#The source sequence.

Returns: ConnectableObservableAsync -- A connectable observable sequence that replays the most recent item to new subscribers and multicasts notifications to all current subscribers.

Remarks

This method is stateless; each call returns a new connectable observable. Subscribers that connect after an item has been published will immediately receive the latest item. This is useful for scenarios where late subscribers should catch up with the most recent value without receiving the full history.