Table of Contents

Class ObjectCollectionT<T>

Namespace
ArcanaDevelopment.adTempus.Client.Collections
Assembly
ArcanaDevelopment.adTempus.Client.dll
public abstract class ObjectCollectionT<T> where T : ObjectBase

Type Parameters

NameDescription
T
Inheritance
object
ObjectCollectionT<T>
Derived

Fields

Collection

protected List<T> Collection

Field Value

List<T>

Properties

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection<T>.

public int Count { get; }

Property Value

int

The number of elements contained in the System.Collections.Generic.ICollection<T>.

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.

public bool IsReadOnly { get; }

Property Value

bool

true if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false.

this[int]

public virtual T this[int index] { get; }

Parameters

NameTypeDescription
index int

Property Value

T

Methods

Add(T)

Adds an item to the System.Collections.Generic.ICollection<T>.

public virtual void Add(T item)

Parameters

NameTypeDescription
item T

The object to add to the System.Collections.Generic.ICollection<T>.

Exceptions

NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

CheckReadOnlyAndThrow()

Throws an exception if the collection is read-only.

protected void CheckReadOnlyAndThrow()

Clear()

Removes all items from the System.Collections.Generic.ICollection<T>.

public virtual void Clear()

Exceptions

NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

Contains(T)

Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.

public virtual bool Contains(T item)

Parameters

NameTypeDescription
item T

The object to locate in the System.Collections.Generic.ICollection<T>.

Returns

bool

true if item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

CopyTo(T[], int)

Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.

public void CopyTo(T[] array, int arrayIndex)

Parameters

NameTypeDescription
array T[]

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source System.Collections.Generic.ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

IndexOf(T)

public int IndexOf(T item)

Parameters

NameTypeDescription
item T

Returns

int

Insert(int, T)

public virtual void Insert(int index, T item)

Parameters

NameTypeDescription
index int
item T

Remove(T)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.

public virtual bool Remove(T item)

Parameters

NameTypeDescription
item T

The object to remove from the System.Collections.Generic.ICollection<T>.

Returns

bool

true if item was successfully removed from the System.Collections.Generic.ICollection<T>; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

Exceptions

NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

RemoveAt(int)

public virtual void RemoveAt(int index)

Parameters

NameTypeDescription
index int