Table of Contents

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

initialEntries IEnumerable<Item<TIdentity, TState>>

The collection's initial contents.

editStreams Stream<CollectionEdit<TKey, TIdentity, TState>>[]

Each stream that edits the collection.

Returns

ReactiveCollection<TKey, TIdentity, TState>

The collection.

Type Parameters

TKey

The type of the keys.

TIdentity

The type of the immutable part of an item.

TState

The type of the mutable part of an item.