Open sandboxFocus

Method AddOrApplyChanges

AddOrApplyChanges<TKey, TValue>(TValue)

Creates a IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding an item to the collection, or, if an item with the same key already exists, update this item with the given new values.

Declaration
public static IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges<TKey, TValue>(TValue item) where TKey : notnull where TValue : class, IIncrementalKeyedCollectionItem<TKey>
Parameters
Type Name Description
TValue item
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>
Type Parameters
Name Description
TKey
TValue

AddOrApplyChanges<TKey, TValue>(params TValue[])

Creates a IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding items to the collection, or, if any item with the same key already exists, update these item with the given new values.

Declaration
public static IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges<TKey, TValue>(params TValue[] items) where TKey : notnull where TValue : class, IIncrementalKeyedCollectionItem<TKey>
Parameters
Type Name Description
TValue[] items
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>
Type Parameters
Name Description
TKey
TValue

AddOrApplyChanges<TKey, TValue>(IEnumerable<TValue>)

Creates a IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding items to the collection, or, if any item with the same key already exists, update these item with the given new values.

Declaration
public static IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges<TKey, TValue>(IEnumerable<TValue> items) where TKey : notnull where TValue : class, IIncrementalKeyedCollectionItem<TKey>
Parameters
Type Name Description
IEnumerable<TValue> items
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>
Type Parameters
Name Description
TKey
TValue