[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.ObservableSortedList-2

ObservableSortedList<TKey, TValue> Class

The SortedList<TKey, TValue> supporting GrapeCity.Documents.Common.IObservableCollectionEx interface.

Inheritance
ObservableSortedList<TKey, TValue>
Implements
IDictionary<TKey, TValue>
ICollection<KeyValuePair<TKey, TValue>>
IReadOnlyDictionary<TKey, TValue>
IEnumerable<KeyValuePair<TKey, TValue>>
Namespace: GrapeCity.Documents.Common
Assembly: DS.Documents.Imaging.dll
Syntax
public class ObservableSortedList<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IList, ICollection, IEnumerable
Public Class ObservableSortedList(Of TKey, TValue)
    Implements IDictionary(Of TKey, TValue), ICollection(Of KeyValuePair(Of TKey, TValue)), IDictionary, IReadOnlyDictionary(Of TKey, TValue), IReadOnlyCollection(Of KeyValuePair(Of TKey, TValue)), IEnumerable(Of KeyValuePair(Of TKey, TValue)), IList, ICollection, 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
ObservableSortedList()

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

ObservableSortedList(IComparer<TKey>)

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

Fields

Name Description
m_Items

The underlying SortedList<TKey, TValue>.

Properties

Name Description
Changed

Gets a value indicating whether the 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.

Events

Name Description
ListChanged

Raised when the list is changed.