An item in a IncrementalKeyedCollection<TKey, TValue>.
Namespace: Metalama.Framework.Options
Assembly: Metalama.Framework.dll
Syntax
public interface IIncrementalKeyedCollectionItem<out TKey> : IIncrementalObject, ICompileTimeSerializable where TKey : notnullType Parameters
| Name | Description |
|---|---|
| TKey | The type of the key that identifies items in the collection. |
Remarks
Classes that implement this interface can be used as values in an IncrementalKeyedCollection<TKey, TValue>. Each item must provide a unique Key and implement the ApplyChanges(object, in ApplyChangesContext) method to support merging of items with the same key across different configuration layers.
Because this interface extends IIncrementalObject, items in the collection must be immutable and use the
same pattern as hierarchical options: properties should typically be nullable, and ApplyChanges(object, in ApplyChangesContext)
should merge properties from two instances, with the changes parameter taking precedence for non-null values.
Properties
| Name | Description |
|---|---|
| Key | Gets the key that uniquely identifies the item in the collection. |