Table of Contents

Class ObservableCompositionList<T>

Namespace
NMF.Models.Collections
Assembly
NMF.Models.dll

Denotes the base class for an observable composition list

public class ObservableCompositionList<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

The type of elements

Inheritance
ObservableCompositionList<T>
Implements
Inherited Members

Constructors

ObservableCompositionList(ModelElement)

Create a new instance

public ObservableCompositionList(ModelElement parent)

Parameters

parent ModelElement

The parent model element

Exceptions

ArgumentNullException

Thrown if parent is null

Properties

Parent

Gets the parent model element

public ModelElement Parent { get; }

Property Value

ModelElement

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 int

The zero-based index at which item should be inserted.

item T

The 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 int

The 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 int

The zero-based index of the element to replace.

item T

The 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.