Class NamedObjectList<T>
Represents list of named objects.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Core
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class NamedObjectList<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : INamedObject
Type Parameters
T
The type of the T. |
Constructors
NamedObjectList()
Properties
Count
Gets the number of elements contained in the System.Collections.Generic.ICollection<T>.
Declaration
public int Count { get; }
Property Value
System.Int32
The number of elements contained in the System.Collections.Generic.ICollection<T>. |
Implements
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean
True if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false. |
Implements
Methods
AddAfter(String, T)
Adds the new item after an existing item.
Declaration
public bool AddAfter(string previousItemName, T item)
Parameters
System.String
previousItemName
Name of the item after which the new item will be added. |
T
item
The new item. |
Returns
System.Boolean
|
AddBefore(String, T)
Adds the new item before an existing item.
Declaration
public bool AddBefore(string nextItemName, T item)
Parameters
System.String
nextItemName
Name of the next item. |
T
item
The new item. |
Returns
System.Boolean
|
AddFirst(T)
Adds the item at the start of the collection.
Declaration
public void AddFirst(T item)
Parameters
T
item
The item to add. |
AddLast(T)
Adds the item at the end of the collection.
Declaration
public void AddLast(T item)
Parameters
T
item
The item to add. |
Clear()
Removes all items from the System.Collections.Generic.ICollection<T>.
Declaration
public void Clear()
Implements
Exceptions
System.NotSupportedException
The System.Collections.Generic.ICollection<T> is read-only. |
Contains(T)
Determines whether the specified item is contained in the collection.
Declaration
public bool Contains(T item)
Parameters
T
item
The item to locate in the collection. |
Returns
System.Boolean
|
Implements
Contains(String)
Determines whether the the specified item name is contained in the collection.
Declaration
public bool Contains(string itemName)
Parameters
System.String
itemName
Name of the item. |
Returns
System.Boolean
|
CopyTo(T[], Int32)
Copies to.
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
T[]
array
The array. |
System.Int32
arrayIndex
Index of the array. |
Implements
GetByName(String)
Gets item by name.
Declaration
public T GetByName(string itemName)
Parameters
System.String
itemName
Name of the item. |
Returns
T
The item if exists, else the default value of the returned type. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<T>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
Remove(T)
Removes the specified item.
Declaration
public bool Remove(T item)
Parameters
T
item
The item to remove. |
Returns
System.Boolean
|
Implements
Remove(String)
Removes the specified item name.
Declaration
public bool Remove(string itemName)
Parameters
System.String
itemName
Name of the item. |
Returns
System.Boolean
|
RemoveOverride(T)
Called just before removing the item.
Declaration
protected virtual void RemoveOverride(T item)
Parameters
T
item
The item to remove. |
Explicit Interface Implementations
ICollection<T>.Add(T)
Adds the specified item.
Declaration
void ICollection<T>.Add(T item)
Parameters
T
item
The new item. |
Implements
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |