[]
Represents a collection of key/value pairs that are sorted on the key. Values should support IOwnedObject interface, collection updates their Owner property.
public class OwnedSortedDictionary<TKey, TValue> : ObservableSortedDictionary<TKey, TValue>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IOwnedObject where TValue : IOwnedObject
TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.
public OwnedSortedDictionary()
Gets a collection owner.
public object Owner { get; }
Adds an element into collection with specified key.
protected override void AddItem(TKey key, TValue value)
key
TKeyvalue
TValueRemoves all elements from the collection.
protected override void ClearItems()
Removes an element with specified key.
protected override bool RemoveItem(TKey key)
key
TKeyReplaces the element with the specified key.
protected override void SetItem(TKey key, TValue value)
key
TKeyvalue
TValueSets the owner of the current object.
protected virtual void SetOwner(object value)
value
objectThe owner to set.