Class SubstitutionClientCollection
The collection class to implement the refined client reference for the Substitution class
public class SubstitutionClientCollection : ICollectionExpression<INamedElement>, IEnumerableExpression<INamedElement>, IEnumerableExpression, ICollection<INamedElement>, IEnumerable<INamedElement>, IEnumerable
- Inheritance
-
SubstitutionClientCollection
- Implements
- Inherited Members
Constructors
SubstitutionClientCollection(ISubstitution)
Creates a new instance
public SubstitutionClientCollection(ISubstitution parent)
Parameters
parent
ISubstitution
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
Methods
Add(INamedElement)
Adds the given element to the collection
public virtual void Add(INamedElement item)
Parameters
item
INamedElementThe item to add
AsNotifiable()
Gets an observable version of this collection
public virtual INotifyCollection<INamedElement> 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(INamedElement)
Gets a value indicating whether the given element is contained in the collection
public virtual bool Contains(INamedElement item)
Parameters
item
INamedElementThe item that should be looked out for
Returns
- bool
True, if it is contained, otherwise False
CopyTo(INamedElement[], int)
Copies the contents of the collection to the given array starting from the given array index
public virtual void CopyTo(INamedElement[] array, int arrayIndex)
Parameters
array
INamedElement[]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<INamedElement> GetEnumerator()
Returns
- IEnumerator<INamedElement>
A generic enumerator
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Fires the CollectionChanged event
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs eventArgs)
Parameters
eventArgs
NotifyCollectionChangedEventArgs
Remove(INamedElement)
Removes the given item from the collection
public virtual bool Remove(INamedElement item)
Parameters
item
INamedElementThe item that should be removed
Returns
- bool
True, if the item was removed, otherwise False
Events
CollectionChanged
Gets fired when the contents of this collection changes
public event NotifyCollectionChangedEventHandler CollectionChanged