)} ,ReactiveUI.Extensions.Async.Subjects.ReplayLatestSubjectCreationOptions)}
ObservableAsync.ReplayLatestPublish(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 ConnectableObservableAsync<T> ReplayLatestPublish<T>(this IObservableAsync<T> source) - 2.
public static ConnectableObservableAsync<T> ReplayLatestPublish<T>(this IObservableAsync<T> source, ReplayLatestSubjectCreationOptions options)
1. Overload¶
public static ConnectableObservableAsync<T> ReplayLatestPublish<T>(this IObservableAsync<T> source)
Summary: Creates a connectable observable sequence that replays only the most recent item to new subscribers.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IObservableAsync | The source sequence. |
Returns: ConnectableObservableAsync
Remarks
This method enables late subscribers to immediately receive the most recently published value, followed by subsequent values. The returned sequence does not replay earlier items beyond the latest one. Use this method when you want all subscribers to observe the most recent value, regardless of when they subscribe.
2. Overload¶
public static ConnectableObservableAsync<T> ReplayLatestPublish<T>(this IObservableAsync<T> source, ReplayLatestSubjectCreationOptions options)
Summary: Creates a connectable observable sequence that replays only the latest published value to new subscribers, using the specified replay subject creation options.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IObservableAsync | The source sequence. |
options | [ReplayLatestSubjectCreationOptions](# | The options used to configure the replay subject, such as buffer size, scheduler, or other replay behavior settings. |
Returns: ConnectableObservableAsync
Remarks
Use this method when you want late subscribers to receive only the most recently published value, rather than the entire sequence or a fixed buffer. The returned connectable observable does not begin emitting items until its Connect method is called.