<PackageReference Include="ReactiveUI.Primitives.Core" Version="8.0.0" />

ReactiveUI.Primitives.Signals.AsyncSignal<T>

public sealed class AsyncSignal<T> : IAwaitSignal<T>, ISignal<T>, ISignal<T, T>, IObserver<T>, IObservable<T>, IsDisposed, IDisposable, INotifyCompletion
A signal that records the latest value and replays it to observers when it completes, so the completion can be awaited.
public bool HasObservers { get; }

Gets a value indicating whether an observer is subscribed and the signal has neither completed nor been disposed.

public bool IsCompleted { get; }

Gets a value indicating whether this instance is completed.

public bool IsDisposed { get; }

Gets a value indicating whether this instance is disposed.

public T Value { get; }

Gets the value the signal completed with.

public AsyncSignal()

public void Dispose()

Drops the observers and the recorded value, making every later notification throw.

Gets the awaiter for this signal.

public T GetResult()

Gets the completed value, blocking the calling thread until the signal completes or faults.

public void OnCompleted()

Completes the signal, emitting the recorded value to the current observers first when one was recorded.

public void OnCompleted(Action continuation)

Registers a callback to run when the signal terminates, on the captured synchronization context.

public void OnError(Exception error)

Faults the signal and forwards error to the current observers, discarding any recorded value.

public void OnNext(T value)

Records value as the value replayed on completion; observers are not notified here.

public void RemoveObserver(IObserver<T> observer)

Removes an observer registered via Subscribe; the observer's subscription handle calls this on disposal.

public IDisposable Subscribe(IObserver<T> observer)

Subscribes an observer, delivering the terminal value or error immediately when the signal has completed.