Open sandboxFocus

Method Add

Add<T>(T)

Creates a new IncrementalHashSet<T> that represents the operation of adding an item to the collection.

Declaration
public static IncrementalHashSet<T> Add<T>(T item) where T : notnull
Parameters
Type Name Description
T item

The item to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

An IncrementalHashSet<T> representing the addition of the specified item.

Type Parameters
Name Description
T

The type of items in the hash set.

Remarks

If the item was previously removed by another layer, this operation re-adds it to the final merged collection.

Add<T>(params T[])

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection.

Declaration
public static IncrementalHashSet<T> Add<T>(params T[] items) where T : notnull
Parameters
Type Name Description
T[] items

The items to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

An IncrementalHashSet<T> representing the addition of the specified items.

Type Parameters
Name Description
T

The type of items in the hash set.

Remarks

If any items were previously removed by another layer, this operation re-adds them to the final merged collection.

Add<T>(IEnumerable<T>)

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection.

Declaration
public static IncrementalHashSet<T> Add<T>(IEnumerable<T> items) where T : notnull
Parameters
Type Name Description
IEnumerable<T> items

The items to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

An IncrementalHashSet<T> representing the addition of the specified items.

Type Parameters
Name Description
T

The type of items in the hash set.

Remarks

If any items were previously removed by another layer, this operation re-adds them to the final merged collection.