Table of Contents

Method FromUpdates

Namespace
SodaFlow.Collections
Assembly
SodaFlow.Core.Collections.dll

FromUpdates(Stream<(TKey Key, Func<TState, TState> Transform)>)

Lifts a stream of keyed transforms into edits, for wiring at collection construction.

public static Stream<CollectionEdit<TKey, TIdentity, TState>> FromUpdates(Stream<(TKey Key, Func<TState, TState> Transform)> updatesStream)

Parameters

updatesStream Stream<(TKey Key, Func<TState, TState> Transform)>

The stream of keyed transforms.

Returns

Stream<CollectionEdit<TKey, TIdentity, TState>>

The stream of edits.

FromUpdates(TKey, Stream<Func<TState, TState>>)

Lifts a stream of transforms for one fixed key into edits — the usual shape when a view drives a single item.

public static Stream<CollectionEdit<TKey, TIdentity, TState>> FromUpdates(TKey key, Stream<Func<TState, TState>> transformsStream)

Parameters

key TKey

The key the transforms apply to.

transformsStream Stream<Func<TState, TState>>

The stream of transforms.

Returns

Stream<CollectionEdit<TKey, TIdentity, TState>>

The stream of edits.