Method Create
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Core.Collections.dll
Create<TKey, TIdentity, TState>(IEnumerable<Item<TIdentity, TState>>, params Stream<CollectionEdit<TKey, TIdentity, TState>>[])
Defines a collection from its initial contents and each stream that edits it, and this code takes the key of each item from the identity.
public static ReactiveCollection<TKey, TIdentity, TState> Create<TKey, TIdentity, TState>(IEnumerable<Item<TIdentity, TState>> initialEntries, params Stream<CollectionEdit<TKey, TIdentity, TState>>[] editStreams) where TKey : notnull where TIdentity : IIdentity<TKey>
Parameters
initialEntriesIEnumerable<Item<TIdentity, TState>>The collection's initial contents.
editStreamsStream<CollectionEdit<TKey, TIdentity, TState>>[]Each stream that edits the collection.
Returns
- ReactiveCollection<TKey, TIdentity, TState>
The collection.
Type Parameters
TKeyThe type of the keys.
TIdentityThe type of the immutable part of an item.
TStateThe type of the mutable part of an item.