Class AssociationMemberEndCollection0
The collection class to implement the refined memberEnd reference for the Association class
public class AssociationMemberEndCollection0 : IListExpression<IProperty>, ICollectionExpression<IProperty>, IEnumerableExpression<IProperty>, IEnumerableExpression, IList<IProperty>, ICollection<IProperty>, IEnumerable<IProperty>, IEnumerable
- Inheritance
-
AssociationMemberEndCollection0
- Implements
- Inherited Members
Constructors
AssociationMemberEndCollection0(IAssociation)
Creates a new instance
public AssociationMemberEndCollection0(IAssociation parent)
Parameters
parent
IAssociation
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 IProperty this[int index] { get; set; }
Parameters
index
int
Property Value
Methods
Add(IProperty)
Adds the given element to the collection
public virtual void Add(IProperty item)
Parameters
item
IPropertyThe item to add
AsNotifiable()
Gets an observable version of this collection
public virtual INotifyCollection<IProperty> 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(IProperty)
Gets a value indicating whether the given element is contained in the collection
public virtual bool Contains(IProperty item)
Parameters
item
IPropertyThe item that should be looked out for
Returns
- bool
True, if it is contained, otherwise False
CopyTo(IProperty[], int)
Copies the contents of the collection to the given array starting from the given array index
public virtual void CopyTo(IProperty[] array, int arrayIndex)
Parameters
array
IProperty[]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<IProperty> GetEnumerator()
Returns
- IEnumerator<IProperty>
A generic enumerator
IndexOf(IProperty)
Gets the index of the given element
public virtual int IndexOf(IProperty item)
Parameters
item
IPropertyThe item that should be looked for
Returns
- int
The index of the given element or -1 if it was not found
Insert(int, IProperty)
Inserts the given item at the given index of the collection
public virtual void Insert(int index, IProperty item)
Parameters
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Fires the CollectionChanged event
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs eventArgs)
Parameters
eventArgs
NotifyCollectionChangedEventArgs
Remove(IProperty)
Removes the given item from the collection
public virtual bool Remove(IProperty item)
Parameters
item
IPropertyThe 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