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

ReactiveUI.Primitives.Advanced.FromEnumerableSignal<T>

Represents a finite signal backed by an enumerable sequence.

Initializes a new instance of the FromEnumerableSignal<T> class.

public FromEnumerableSignal(IEnumerable<T> values, CancellationToken cancellationToken)

Initializes a new instance of the FromEnumerableSignal<T> class.

Indicates whether subscription has to happen on the calling thread.

public IDisposable Subscribe(IObserver<T> observer)

Enumerates the source into observer on the calling thread, completing it at the end.

public IDisposable Subscribe(Action<T> onNext, Action<Exception> onError, Action onCompleted)

Enumerates the source into the callbacks on the calling thread, invoking onCompleted at the end.

public bool TryGetReadOnlyValues(out IReadOnlyList values)

Exposes the backing sequence directly when it is an indexable list and no cancellation token was supplied.