Open sandboxFocus

Method AddOrApplyChanges

AddOrApplyChanges(TValue)

Creates a IncrementalKeyedCollection<TKey, TValue> that contains all operations already contained in the current object, plus the operation of adding an item, or, if an item with the same key already exists, update it with the given new values.

Declaration
public IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges(TValue item)
Parameters
Type Name Description
TValue item
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>

AddOrApplyChanges(params TValue[])

Creates a IncrementalKeyedCollection<TKey, TValue> that contains all operations already contained in the current object, plus the operation of adding items, or, if any item with the same key already exists, update it with the given new values.

Declaration
public IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges(params TValue[] items)
Parameters
Type Name Description
TValue[] items
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>

AddOrApplyChanges(IEnumerable<TValue>)

Creates a IncrementalKeyedCollection<TKey, TValue> that contains all operations already contained in the current object, plus the operation of adding items, or, if any item with the same key already exists, update it with the given new values.

Declaration
public IncrementalKeyedCollection<TKey, TValue> AddOrApplyChanges(IEnumerable<TValue> items)
Parameters
Type Name Description
IEnumerable<TValue> items
Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>