NamedObjectList<T>
Provides an ordered collection of named objects with dictionary-style access by name and list-style ordering.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Core
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Type Parameters:
T
The type of the T.
Syntax:
public class NamedObjectList<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : INamedObject
Inheritance: objectNamedObjectList<T>
Implements:
Constructors
Initializes a new instance of the NamedObjectList<T> class.
public NamedObjectList()
Properties
Gets the number of elements contained in the ICollection<T>.
public int Count { get; }
The number of elements contained in the ICollection<T>.
Implements:
Gets a value indicating whether the ICollection<T> is read-only.
public bool IsReadOnly { get; }
True if the ICollection<T> is read-only; otherwise, false.
Implements:
Methods
Adds the item at the beginning of the collection, making it the first element.
public void AddFirst(T item)
The item to add.
Adds the item at the end of the collection.
public void AddLast(T item)
The item to add.
Removes all items from the ICollection<T>.
Determines whether the specified item is contained in the collection.
public bool Contains(T item)
The item to locate in the collection.
Returns:True if contained.
Implements:
Copies all items to the specified array starting at the given index.
public void CopyTo(T[] array, int arrayIndex)
The array.
arrayIndexintIndex of the array.
Implements:
Retrieves the item with the specified name, or the default value if not found.
public T GetByName(string itemName)
Name of the item.
Returns:T
The item if exists, else the default value of the returned type.
Returns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()
IEnumerator<T>
A IEnumerator<T> that can be used to iterate through the collection.
Implements:
Removes the specified item.
public bool Remove(T item)
The item to remove.
Returns:True if succeed.
Implements:
Invoked immediately before removing an item, allowing derived classes to perform cleanup.
protected virtual void RemoveOverride(T item)
The item to remove.