Show / Hide Table of Contents

Class SynchronizedList<T>

Inheritance
System.Object
SynchronizedList<T>
PersistableCollection<T>
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Collections.IList
System.Collections.ICollection
Namespace: MESL.SqlRace.Domain.Collections
Assembly: MESL.SqlRace.Domain.dll
Syntax
public abstract class SynchronizedList<T> : Object, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection
Type Parameters
Name Description
T

Properties

Count

Gets the number of elements contained in the System.Collections.ICollection.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

IsFixedSize

Gets a value indicating whether the System.Collections.IList has a fixed size.

Declaration
public bool IsFixedSize { get; }
Property Value
Type Description
System.Boolean

IsSynchronized

Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).

Declaration
public bool IsSynchronized { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Gets or sets the element at the specified index.

Declaration
public T this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
T

Items

This is kept to be like the Collection implementation.

Declaration
protected IList<T> Items { get; }
Property Value
Type Description
System.Collections.Generic.IList<T>

SyncRoot

Gets an object that can be used to synchronize access to the System.Collections.ICollection.

Declaration
public object SyncRoot { get; }
Property Value
Type Description
System.Object

Methods

Add(T)

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

Declaration
public void Add(T element)
Parameters
Type Name Description
T element

Add(IEnumerable<T>)

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

Declaration
public virtual void Add(IEnumerable<T> elements)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> elements

Add(Object)

Adds an item to the System.Collections.IList.

Declaration
public int Add(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Int32

AddBase(Object)

Declaration
protected int AddBase(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Int32

ClearItems()

Override this to provide custom logic when the list is cleared. For example, if you wanted to trigger events, alerts, additional validation and/or enrichment on insert or add.

Declaration
protected virtual void ClearItems()

Clone()

Declaration
public List<T> Clone()
Returns
Type Description
System.Collections.Generic.List<T>

Contains(T)

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

Declaration
public bool Contains(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean

Contains(Object)

Determines whether the System.Collections.IList contains a specific value.

Declaration
public bool Contains(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Boolean

CopyTo(T[], Int32)

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

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array
System.Int32 arrayIndex

CopyTo(Array, Int32)

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

Declaration
public void CopyTo(Array array, int index)
Parameters
Type Name Description
System.Array array
System.Int32 index

CopyToBase(Array, Int32)

Declaration
protected void CopyToBase(Array array, int arrayIndex)
Parameters
Type Name Description
System.Array array
System.Int32 arrayIndex

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<T>

IndexOf(T)

Determines the index of a specific item in the System.Collections.Generic.IList<>.

Declaration
public int IndexOf(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Int32

IndexOf(Object)

Determines the index of a specific item in the System.Collections.IList.

Declaration
public int IndexOf(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Int32

Insert(Int32, T)

Inserts an item to the System.Collections.Generic.IList<> at the specified index.

Declaration
public void Insert(int index, T item)
Parameters
Type Name Description
System.Int32 index
T item

Insert(Int32, Object)

Inserts an item to the System.Collections.IList at the specified index.

Declaration
public void Insert(int index, object value)
Parameters
Type Name Description
System.Int32 index
System.Object value

InsertItem(Int32, T)

Override this to provide custom logic when insert item is called. For example, if you wanted to trigger events, alerts, additional validation and/or enrichment on insert or add.

Declaration
protected virtual void InsertItem(int index, T element)
Parameters
Type Name Description
System.Int32 index

The index location to insert the item

T element

The element to be inserted

Remove(T)

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

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean

Remove(Object)

Removes the first occurrence of a specific object from the System.Collections.IList.

Declaration
public void Remove(object value)
Parameters
Type Name Description
System.Object value

RemoveItem(Int32)

Override this to provide custom logic when an item is removed. For example, if you wanted to trigger events, alerts, additional validation and/or enrichment on insert or add.

Declaration
protected virtual void RemoveItem(int index)
Parameters
Type Name Description
System.Int32 index

The index location to remove the item

SetItem(Int32, T)

Override this to provide custom logic when set item is called. For example, if you wanted to trigger events, alerts, additional validation and/or enrichment on insert or add.

Declaration
protected virtual void SetItem(int index, T element)
Parameters
Type Name Description
System.Int32 index

The index location to set the item

T element

The element to be put into the list

Implements

System.Collections.Generic.IList<>
System.Collections.Generic.ICollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
System.Collections.IList
System.Collections.ICollection
Back to top Generated by DocFX