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
-
DecoratedSet<T>OrderedSet<T>ObservableCompositionOrderedSet<T>
- Implements
-
IOrderedSet<T>IList<T>ISet<T>ICollection<T>IEnumerable<T>
- Inherited Members
Constructors
ObservableCompositionOrderedSet(ModelElement)
Creates a new instance
public ObservableCompositionOrderedSet(ModelElement parent)
Parameters
parent
ModelElementThe parent model element
Exceptions
- ArgumentNullException
Thrown if the parent is null
Properties
Parent
Gets the parent model element
public ModelElement Parent { get; }
Property Value
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
TThe element to add to the set.
Returns
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
intThe zero-based index at which
item
should be inserted.item
TThe 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
TThe item to remove
index
intThe 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
intThe arrayIndex on which the item is replaced
oldValue
TThe old value
newValue
TThe new value