[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.ObservableSortedDictionary-2

ObservableSortedDictionary<TKey, TValue> Class

Represents a collection of key/value pairs that are sorted on the key.

Inheritance
ObservableSortedDictionary<TKey, TValue>
Implements
IDictionary<TKey, TValue>
ICollection<KeyValuePair<TKey, TValue>>
IReadOnlyDictionary<TKey, TValue>
IEnumerable<KeyValuePair<TKey, TValue>>
Namespace: GrapeCity.Documents.Common
Assembly: GcDocs.Imaging.dll
Syntax
public class ObservableSortedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Type Parameters
Name Description
TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.

Constructors

Name Description
ObservableSortedDictionary()

Initializes a new instance of the ObservableSortedDictionary<TKey, TValue> class.

ObservableSortedDictionary(IComparer<TKey>)

Initializes a new instance of the ObservableSortedDictionary<TKey, TValue> class.

Fields

Name Description
m_Items

The underlying SortedDictionary<TKey, TValue>.

Properties

Name Description
Changed

Gets a value indicating whether list was changed.

Count

Gets the number of key/value pairs contained in the SortedDictionary<TKey, TValue>.

this[TKey]

Gets or sets the value associated with the specified key.

Keys

Gets a collection containing the keys in the ObservableSortedDictionary<TKey, TValue>.

Values

Gets a collection containing the values in the SortedDictionary<TKey, TValue>.

Methods

Name Description
Add(TKey, TValue)

Adds an element with the specified key and value into the ObservableSortedDictionary<TKey, TValue>.

AddItem(TKey, TValue)

Adds an element into collection with specified key.

Clear()

Removes all elements from the ObservableSortedDictionary<TKey, TValue>.

ClearItems()

Removes all elements from the collection.

ContainsKey(TKey)

Determines whether the ObservableSortedDictionary<TKey, TValue> contains an element with the specified key.

OnChanged()

Called when dictionary was changed, sets Changed to true.

Remove(TKey)

Removes the element with the specified key from the ObservableSortedDictionary<TKey, TValue>.

RemoveItem(TKey)

Removes an element with specified key.

SetItem(TKey, TValue)

Replaces the element with the specified key.

TryGetValue(TKey, out TValue)

Gets the value associated with the specified key.