[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.OwnedCollectionBase-1

Class OwnedCollectionBase<TItem>

Namespace
GrapeCity.Documents.Common
Assembly
GcDocs.Imaging.dll

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

Type Parameters

TItem
Inheritance
object
System.Collections.ObjectModel.Collection<T><TItem>
OwnedCollectionBase<TItem>
Implements
System.Collections.Generic.IList<T><TItem>
System.Collections.Generic.ICollection<T><TItem>
System.Collections.Generic.IReadOnlyList<T><TItem>
System.Collections.Generic.IReadOnlyCollection<T><TItem>
System.Collections.Generic.IEnumerable<T><TItem>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.Collection<TItem>.Add(TItem)
System.Collections.ObjectModel.Collection<TItem>.Clear()
System.Collections.ObjectModel.Collection<TItem>.CopyTo(TItem[], int)
System.Collections.ObjectModel.Collection<TItem>.Contains(TItem)
System.Collections.ObjectModel.Collection<TItem>.GetEnumerator()
System.Collections.ObjectModel.Collection<TItem>.IndexOf(TItem)
System.Collections.ObjectModel.Collection<TItem>.Insert(int, TItem)
System.Collections.ObjectModel.Collection<TItem>.Remove(TItem)
System.Collections.ObjectModel.Collection<TItem>.RemoveAt(int)
System.Collections.ObjectModel.Collection<TItem>.Count
System.Collections.ObjectModel.Collection<TItem>.Items
System.Collections.ObjectModel.Collection<TItem>.this[int]
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

OwnedCollectionBase()

public OwnedCollectionBase()

Properties

Changed

Gets a value indicating whether the collection was changed.

public bool Changed { get; set; }

Property Value

bool

Owner

Gets a collection owner.

public object Owner { get; }

Property Value

object

Methods

AddRange(IEnumerable<TItem>)

Adds all items from items to this collection.

public void AddRange(IEnumerable<TItem> items)

Parameters

items System.Collections.Generic.IEnumerable<T><TItem>

The collection containing items to add.

AddRange(IEnumerable)

Adds all items from items to this collection.

public void AddRange(IEnumerable items)

Parameters

items System.Collections.IEnumerable

The collection containing items to add.

ClearItems()

protected override void ClearItems()

InsertItem(int, TItem)

protected override void InsertItem(int index, TItem item)

Parameters

index int
item TItem

OnChanged()

Called when collection is changed, sets Changed to true.

protected virtual void OnChanged()

RemoveItem(int)

protected override void RemoveItem(int index)

Parameters

index int

SetItem(int, TItem)

protected override void SetItem(int index, TItem item)

Parameters

index int
item TItem

SetOwner(object)

Sets the owner of the current object.

protected virtual void SetOwner(object value)

Parameters

value object

The owner to set.

Sort(IComparer<TItem>)

Sorts the elements in the entire collection using the specified System.Collections.Generic.IComparer<T>.

public void Sort(IComparer<TItem> comparer)

Parameters

comparer System.Collections.Generic.IComparer<T><TItem>

Sort(Comparison<TItem>)

Sorts the elements in the entire collection using the specified System.Comparison<T>.

public void Sort(Comparison<TItem> comparison)

Parameters

comparison System.Comparison<T><TItem>

Sort(int, int, IComparer<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)

Parameters

index int
count int
comparer System.Collections.Generic.IComparer<T><TItem>