Table of Contents

Class ObservableCompositionOrderedSet<T>

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

Denotes the base class for an observable collection composition implemented as an ordered set

public class ObservableCompositionOrderedSet<T> : ObservableOrderedSet<T>, INotifyCollectionChanged, INotifyCollectionChanging, INotifyPropertyChanged, IOrderedSetExpression<T>, IListExpression<T>, ISetExpression<T>, ICollectionExpression<T>, IEnumerableExpression<T>, IOrderedSet<T>, IList<T>, ISet<T>, ICollection<T>, IEnumerable<T>, ICollectionExpression, IEnumerableExpression, IList, ICollection, IEnumerable where T : class, IModelElement

Type Parameters

T
Inheritance
ObservableCompositionOrderedSet<T>
Implements
ISet<T>
Inherited Members

Constructors

ObservableCompositionOrderedSet(ModelElement)

Creates a new instance

public ObservableCompositionOrderedSet(ModelElement parent)

Parameters

parent ModelElement

The parent model element

Exceptions

ArgumentNullException

Thrown if the parent is null

Properties

Parent

Gets the parent model element

public ModelElement Parent { get; }

Property Value

ModelElement

Methods

Add(T)

Adds an element to the current set and returns a value to indicate if the element was successfully added.

public override bool Add(T item)

Parameters

item T

The element to add to the set.

Returns

bool

true if the element is added to the set; false if the element is already in the set.

Clear()

Removes all items from the ICollection<T>.

public override void Clear()

Exceptions

NotSupportedException

The ICollection<T> is read-only.

Insert(int, T)

Inserts an item to the IList<T> at the specified index.

public override void Insert(int index, T item)

Parameters

index int

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

item T

The object to insert into the IList<T>.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

Remove(T, int)

Removes the given item at the given arrayIndex

protected override bool Remove(T item, int index)

Parameters

item T

The item to remove

index int

The arrayIndex of the item

Returns

bool

True, if the removal was successful, otherwise false

Replace(int, T, T)

Replaces the item at the given arrayIndex

protected override void Replace(int index, T oldValue, T newValue)

Parameters

index int

The arrayIndex on which the item is replaced

oldValue T

The old value

newValue T

The new value