MetalamaAPI documentationAspect APIMetalama.​Framework.​OptionsIncremental­Hash­Set<T>
Open sandboxFocus

IncrementalHashSet<T> Class

An immutable hash set where each class instance does not represent the full set but a modification of another set (possibly empty). This class implements the IIncrementalObject interface and can be easily used in the context of an IHierarchicalOptions<T>. The class can represent the Add(T), Remove(T) and Clear<T>() operations.

Inheritance
IncrementalHashSet<T>
Namespace: Metalama.Framework.Options
Assembly: Metalama.Framework.dll
Syntax
public class IncrementalHashSet<T> : Object, IIncrementalObject, ICompileTimeSerializable
Type Parameters
Name Description
T

Type of items.

Constructors

Name Description
IncrementalHashSet(ImmutableDictionary<T, Boolean>, Boolean)

Properties

Name Description
Count

Gets the number of items in the current collection.

Empty

Gets an IncrementalHashSet<T> that represents the absence of any change in the collection.

IsEmpty

Methods

Name Description
Add(T)

Creates a new IncrementalHashSet<T> that represents the operation of adding an item to the collection, additionally to any operation represented by the current collection.

Add(T[])

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection, additionally to any operation represented by the current collection.

Add(IEnumerable<T>)

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection, additionally to any operation represented by the current collection.

ApplyChanges(IncrementalHashSet<T>, in ApplyChangesContext)

Overrides the current collection with another collection and returns the result.

Create(ImmutableDictionary<T, Boolean>, Boolean)
GetEnumerator()
Remove(T)

Creates a new IncrementalHashSet<T> that represents the option of removing an item from the collection, additionally to any operation represented by the current object.

Remove(T[])

Creates a new IncrementalHashSet<T> that represents the option of removing a items from the collection, additionally to any operation represented by the current object.

Remove(IEnumerable<T>)

Creates a new IncrementalHashSet<T> that represents the option of removing a items from the , additionally to any operation represented by the current object.

Explicit Interface Implementations

Name Description
IIncrementalObject.ApplyChanges(Object, in ApplyChangesContext)