[]
Base collection implementing IOwnedObject interface.
public class OwnedCollectionBase<TItem> : Collection<TItem>, IList<TItem>, ICollection<TItem>, IReadOnlyList<TItem>, IReadOnlyCollection<TItem>, IEnumerable<TItem>, IOwnedObject, IList, ICollection, IEnumerable
TItem
public OwnedCollectionBase()
Gets a value indicating whether the collection was changed.
public bool Changed { get; set; }
Gets a collection owner.
public object Owner { get; }
Adds all items from items
to this collection.
public void AddRange(IEnumerable<TItem> items)
items
System.Collections.Generic.IEnumerable<T><TItem>The collection containing items to add.
Adds all items from items
to this collection.
public void AddRange(IEnumerable items)
items
System.Collections.IEnumerableThe collection containing items to add.
protected override void ClearItems()
protected override void InsertItem(int index, TItem item)
index
intitem
TItemCalled when collection is changed, sets Changed to true.
protected virtual void OnChanged()
protected override void RemoveItem(int index)
index
intprotected override void SetItem(int index, TItem item)
index
intitem
TItemSets the owner of the current object.
protected virtual void SetOwner(object value)
value
objectThe owner to set.
Sorts the elements in the entire collection using the specified System.Collections.Generic.IComparer<T>.
public void Sort(IComparer<TItem> comparer)
comparer
System.Collections.Generic.IComparer<T><TItem>Sorts the elements in the entire collection using the specified System.Comparison<T>.
public void Sort(Comparison<TItem> comparison)
comparison
System.Comparison<T><TItem>Sorts the elements in a range of elements using the specified System.Collections.Generic.IComparer<T>.
public void Sort(int index, int count, IComparer<TItem> comparer)
index
intcount
intcomparer
System.Collections.Generic.IComparer<T><TItem>