Open sandboxFocus

Class IncrementalKeyedCollection

Factory for the generic IncrementalKeyedCollection<TKey, TValue> class.

Inheritance
IncrementalKeyedCollection
Namespace: Metalama.Framework.Options
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class IncrementalKeyedCollection
Remarks

This static class provides convenient factory methods for creating IncrementalKeyedCollection<TKey, TValue> instances. These methods are useful when constructing incremental keyed collections as properties within hierarchical options classes.

Incremental keyed collections are typically used in option classes when you need a property that represents a collection of complex items (each implementing IIncrementalKeyedCollectionItem<TKey>) that can be added, updated, or removed across different configuration layers. For example, you might have a collection of caching policy rules where each rule is identified by a key and can be refined at different levels.

Methods

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

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding items to the collection, or merging them with existing items if the same keys already exist.

AddOrApplyChanges<TKey, TValue>(TValue)

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding an item to the collection, or merging it with an existing item if the same key already exists.

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

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of adding items to the collection, or merging them with existing items if the same keys already exist.

Clear<TKey, TValue>()

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

Empty<TKey, TValue>()

Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the absence of any operation.

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

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

Remove<TKey, TValue>(TValue)

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

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

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

See Also