Class TransitionOwnedRuleCollection
The collection class to implement the refined ownedRule reference for the Transition class
public class TransitionOwnedRuleCollection : IListExpression<IConstraint>, ICollectionExpression<IConstraint>, IEnumerableExpression<IConstraint>, IEnumerableExpression, IList<IConstraint>, ICollection<IConstraint>, IEnumerable<IConstraint>, IEnumerable
- Inheritance
-
TransitionOwnedRuleCollection
- Implements
- Inherited Members
Constructors
TransitionOwnedRuleCollection(ITransition)
Creates a new instance
public TransitionOwnedRuleCollection(ITransition parent)
Parameters
parent
ITransition
Properties
Count
Gets the amount of elements contained in this collection
public virtual int Count { get; }
Property Value
IsAttached
Returns that this composed collection is always attached.
public bool IsAttached { get; }
Property Value
IsReadOnly
Gets a value indicating that the collection is not read-only
public virtual bool IsReadOnly { get; }
Property Value
this[int]
Gets or sets the item at the given position
public virtual IConstraint this[int index] { get; set; }
Parameters
index
int
Property Value
Methods
Add(IConstraint)
Adds the given element to the collection
public virtual void Add(IConstraint item)
Parameters
item
IConstraintThe item to add
AsNotifiable()
Gets an observable version of this collection
public virtual INotifyCollection<IConstraint> AsNotifiable()
Returns
Attach()
Attaches this collection class
public void Attach()
Clear()
Clears the collection and resets all references that implement it.
public virtual void Clear()
Contains(IConstraint)
Gets a value indicating whether the given element is contained in the collection
public virtual bool Contains(IConstraint item)
Parameters
item
IConstraintThe item that should be looked out for
Returns
- bool
True, if it is contained, otherwise False
CopyTo(IConstraint[], int)
Copies the contents of the collection to the given array starting from the given array index
public virtual void CopyTo(IConstraint[] array, int arrayIndex)
Parameters
array
IConstraint[]The array in which the elements should be copied
arrayIndex
intThe starting index
Detach()
Detaches this collection class
public void Detach()
GetEnumerator()
Gets an enumerator that enumerates the collection
public virtual IEnumerator<IConstraint> GetEnumerator()
Returns
- IEnumerator<IConstraint>
A generic enumerator
IndexOf(IConstraint)
Gets the index of the given element
public virtual int IndexOf(IConstraint item)
Parameters
item
IConstraintThe item that should be looked for
Returns
- int
The index of the given element or -1 if it was not found
Insert(int, IConstraint)
Inserts the given item at the given index of the collection
public virtual void Insert(int index, IConstraint item)
Parameters
index
intThe index where to add the item
item
IConstraintThe item that should be added
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Fires the CollectionChanged event
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs eventArgs)
Parameters
eventArgs
NotifyCollectionChangedEventArgs
Remove(IConstraint)
Removes the given item from the collection
public virtual bool Remove(IConstraint item)
Parameters
item
IConstraintThe item that should be removed
Returns
- bool
True, if the item was removed, otherwise False
RemoveAt(int)
Removes the item at the given position
public virtual void RemoveAt(int index)
Parameters
index
intThe index where to remove the item
Events
CollectionChanged
Gets fired when the contents of this collection changes
public event NotifyCollectionChangedEventHandler CollectionChanged