Class ObservableAssociationList<T>
- Namespace
- NMF.Models.Collections
- Assembly
- NMF.Models.dll
An observable collection to store associated model elements
public class ObservableAssociationList<T> : ObservableList<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IList, ICollection, INotifyCollectionChanging, INotifyPropertyChanged, INotifyCollectionChanged, IListExpression<T>, IList<T>, ICollectionExpression<T>, IEnumerableExpression<T>, IEnumerableExpression, ICollection<T>, IEnumerable<T>, IEnumerable where T : class, IModelElement
Type Parameters
T
- Inheritance
-
Collection<T>ObservableAssociationList<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Inherited Members
Methods
ClearItems()
Removes all elements from the Collection<T>.
protected override void ClearItems()
InsertItem(int, T)
Inserts an element into the Collection<T> at the specified index.
protected override void InsertItem(int index, T item)
Parameters
index
intThe zero-based index at which
item
should be inserted.item
TThe object to insert. The value can be null for reference types.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.
-or-
index
is greater than Count.
RemoveItem(int)
Removes the element at the specified index of the Collection<T>.
protected override void RemoveItem(int index)
Parameters
index
intThe zero-based index of the element to remove.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.
-or-
index
is equal to or greater than Count.
SetItem(int, T)
Replaces the element at the specified index.
protected override void SetItem(int index, T item)
Parameters
index
intThe zero-based index of the element to replace.
item
TThe new value for the element at the specified index. The value can be null for reference types.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.
-or-
index
is greater than Count.