[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.OwnedKeyedCollection-2

OwnedKeyedCollection<TKey, TItem> Class

Represents an OwnedCollection<TItem> of uniquely elements, each element should have unique key.

Inheritance
Collection<TItem>
OwnedKeyedCollection<TKey, TItem>
Namespace: GrapeCity.Documents.Common
Assembly: DS.Documents.Imaging.dll
Syntax
public abstract class OwnedKeyedCollection<TKey, TItem> : OwnedCollection<TItem>, IList<TItem>, ICollection<TItem>, IReadOnlyList<TItem>, IReadOnlyCollection<TItem>, IEnumerable<TItem>, IOwnedObject, IList, ICollection, IEnumerable where TItem : IOwnedObject
Public MustInherit Class OwnedKeyedCollection(Of TKey, TItem As IOwnedObject)
    Inherits OwnedCollection(Of TItem)
    Implements IList(Of TItem), ICollection(Of TItem), IReadOnlyList(Of TItem), IReadOnlyCollection(Of TItem), IEnumerable(Of TItem), IOwnedObject, IList, ICollection, IEnumerable
Type Parameters
Name Description
TKey

The type of keys in the collection.

TItem

The type of items in the collection.

Constructors

Name Description
OwnedKeyedCollection()

Methods

Name Description
CheckKey(TItem, TKey, TKey)

Throws an exception if collection already contains item with specified key.

ClearItems()
GetKeyForItem(TItem)

When implemented in a derived class, extracts the key from the specified element.

IndexOfKey(TKey)

Returns the 0-based index of a TItem with specified key in the current OwnedKeyedCollection<TKey, TItem>.

InsertItem(int, TItem)
RemoveItem(int)
SetItem(int, TItem)
TryGetValue(TKey, out TItem)

Get an item with specified key.