Open sandboxFocus

Method Remove

Remove<TKey, TValue>(TValue)

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of removing an item from the collection.

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

The item to remove from the collection (identified by its key).

Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>

An IncrementalKeyedCollection<TKey, TValue> representing the removal of the specified item.

Type Parameters
Name Description
TKey

The type of keys in the collection.

TValue

The type of values in the collection.

Remarks

If the item was previously added by another layer, this operation removes it from the final merged collection.

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

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of removing items from the collection.

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

The items to remove from the collection (identified by their keys).

Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>

An IncrementalKeyedCollection<TKey, TValue> representing the removal of the specified items.

Type Parameters
Name Description
TKey

The type of keys in the collection.

TValue

The type of values in the collection.

Remarks

If any items were previously added by another layer, this operation removes them from the final merged collection.

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

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of removing items from the collection.

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

The items to remove from the collection (identified by their keys).

Returns
Type Description
IncrementalKeyedCollection<TKey, TValue>

An IncrementalKeyedCollection<TKey, TValue> representing the removal of the specified items.

Type Parameters
Name Description
TKey

The type of keys in the collection.

TValue

The type of values in the collection.

Remarks

If any items were previously added by another layer, this operation removes them from the final merged collection.