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

ReactiveUI.Primitives.Signals.Broadcaster<T>

public struct Broadcaster<T> : IEquatable<Broadcaster<T>>
Copy-on-write observer broadcaster optimized for zero-allocation single-subscriber delivery.
public bool HasObservers { get; }

Gets a value indicating whether at least one observer is registered.

public static bool op_Equality(Broadcaster<T> left, Broadcaster<T> right)

Determines whether two broadcasters reference the same observer set.

public static bool op_Inequality(Broadcaster<T> left, Broadcaster<T> right)

Determines whether two broadcasters reference different observer sets.

public void Add(IObserver<T> observer)

Adds an observer to the broadcaster. The update is a lock-free compare-and-swap, so the broadcaster is self-contained and does not rely on an external lock for correctness.

public void Clear()

Removes all observers from the broadcaster.

public void Completed()

Broadcasts completion to the current observers.

public bool Equals(Broadcaster<T> other)

public void Error(Exception exception)

Broadcasts an error to the current observers.

public void Next(T value)

Broadcasts a value to the current observers.

public void Remove(IObserver<T> observer)

Removes an observer from the broadcaster using a lock-free compare-and-swap.