UndoableKeyedCollectionTKey, TNode Class

Spotfire 14.3 API Reference
An undoable collection of document nodes that behaves like a hybrid between a list and a dictionary.
Inheritance Hierarchy

SystemObject
  Node
    UndoableNodeBase
      UndoableNode
        UndoableCollectionNode
          Spotfire.Dxp.Framework.DocumentModelUndoableKeyedCollectionTKey, TNode

Namespace:  Spotfire.Dxp.Framework.DocumentModel
Assembly:  Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
[SerializableAttribute]
public class UndoableKeyedCollection<TKey, TNode> : UndoableCollectionNode, 
	IList<TNode>, ICollection<TNode>, IEnumerable<TNode>, IEnumerable
where TNode : DocumentNode

Type Parameters

TKey
The type of key held by the nodes in the collection.
TNode
The type of the nodes in the collection.

The UndoableKeyedCollectionTKey, TNode type exposes the following members.

Properties

  NameDescription
Public propertyCount
Gets the number of elements contained in the ICollectionT.
Public propertyItemInt32
Gets or sets the TNode at the specified index.
Public propertyItemTKey
Gets the element with the specified key.
Top
Methods

  NameDescription
Public methodAdd
Adds an item to the ICollectionT.
Public methodAddRange
Adds the elements of the specified collection to the end of this instance.
Public methodAsReadOnly
Returns a read-only IListT containing the elements in this collection.
Public methodClear
Removes all items from the ICollectionT.
Public methodContains
Determines whether the ICollectionT contains a specific value.
Public methodContainsKey
Determines whether the specified key contains key.
Public methodCopyTo
Copies the elements of the ICollectionT to an Array, starting at a particular Array index.
Public methodExists
Determines whether the List contains elements that match the conditions defined by the specified predicate.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the collection.
Public methodFindAll
Retrieves the all the elements that match the conditions defined by the specified predicate.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Protected methodGetObjectData
Implements ISerializable.
(Overrides UndoableCollectionNode.GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Determines the index of a specific item in the IListT.
Public methodInsert
Inserts an item to the IListT at the specified index.
Public methodInsertRange
Inserts the elements of the specified collection at the specified index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(TKey)
Removes the element with the specified key, returning true if this instance contained an element with the specified key prior to the removal.
Public methodRemove(TNode)
Removes the first occurrence of a specific object from the ICollectionT.
Public methodRemoveAll
Removes all elements that match the conditions defined by the specified predicate.
Public methodRemoveAt
Removes the IListT item at the specified index.
Public methodRemoveRange
Remove count elements starting at position index. If count is zero, no elements are removed and no event is raised.
Public methodReplaceAll
Replaces the contents of this instance with the elements in the specified collection.
Public methodSort
Sorts the elements in this collection using the default comparer.
Public methodSort(IComparerTNode)
Sorts the elements in this collection using the specified comparer.
Public methodSort(ComparisonTNode)
Sorts the elements in this collection using the specified System.Comparison.
Public methodSort(Int32, Int32, IComparerTNode)
Sorts the elements in a range of collection using the specified comparer.
Public methodToArray
Copies the elements of this collection to a new array.
Public methodToCollection
Copies the elements of the UndoableKeyedCollection to a Collection
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Tries to get the element associated with the specified key, returning true upon success.
Top
Explicit Interface Implementations

  NameDescription
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
Explicit interface implementationPrivate propertyICollectionTNodeIsReadOnly
Gets a value indicating whether the ICollectionT is read-only.
Top
Remarks

An UndoableKeyedCollection is a list of document nodes that can be efficiently accessed both using the index in the list (just like an UndoableListT) and a key. Each node in an UndoableKeyedCollection must have an UndoablePropertyT with value of type TKey. The value of that property can be used to efficiently access the nodes.
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference