Show / Hide Table of Contents

Class ListBase<TListSelect, TListItem>

Listbase is the base-class for the different list-classes. Among other, it contains the array that keeps the lists elements.

Inheritance
Object
ListBase<TListSelect, TListItem>
ActivityList
ContactList
DocumentList
PersonList
ProjectEventList
ProjectList
ProjectMemberList
RelationsList
SaleList
UserList
Implements
IList
ICollection
IList<TListItem>
ICollection<TListItem>
IEnumerable<TListItem>
IEnumerable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public abstract class ListBase<TListSelect, TListItem> : IList, ICollection, IList<TListItem>, ICollection<TListItem>, IEnumerable<TListItem>, IEnumerable where TListSelect : SqlCommand where TListItem : ListItemBase<TListSelect>
Type Parameters
Name Description
TListSelect
TListItem

Constructors

ListBase()

Default constructor

Declaration
public ListBase()

Properties

Count

Get the number of elements contained in the underlying collection.

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

IsFixedSize

A collection with a fixed size does not allow the addition or removal of elements after the collection is created, but it allows the modification of existing elements. IsFixedSize will return true for lists inheriting ListBase.

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

IsReadOnly

A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created. IsReadOnly will return true for lists inheriting ListBase.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
Boolean

Item[Int32]

Get the in the collection from the list.

Declaration
public TListItem this[int index] { get; }
Parameters
Type Name Description
Int32 index

Index of the item in the list, where 0 is the first item.

Property Value
Type Description
TListItem

ListCollection

Set/Get property on collection.

Declaration
protected List<TListItem> ListCollection { get; set; }
Property Value
Type Description
List<TListItem>

Methods

Contains(TListItem)

Checks if the list contains the object or not. Implemented in classes inheriting ListBase.

Declaration
public virtual bool Contains(TListItem item)
Parameters
Type Name Description
TListItem item

The object to locate in the Array.

Returns
Type Description
Boolean

True if value is found in the Array; otherwise, False

CopyTo(TListItem[], Int32)

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

CopyTo(Array, Int32)

CopyTo(Array, Int32)

Declaration
public void CopyTo(Array list, int index)
Parameters
Type Name Description
Array list

The array

Int32 index

The array index

GetEnumerator()

See MSDN-documentation for GetEnumerator.

Declaration
public virtual IEnumerator GetEnumerator()
Returns
Type Description
IEnumerator

IndexOf(TListItem)

Returns the object at the given index. Implemented in classes inheriting ListBase.

Declaration
public virtual int IndexOf(TListItem item)
Parameters
Type Name Description
TListItem item

The object

Returns
Type Description
Int32

The index of the object.

OnLoad(TListSelect, SoDataReader)

Responsible for reading each row with data from the SoDataReader and insert the object each row represents into the class' collection.

Declaration
protected virtual void OnLoad(TListSelect query, SoDataReader reader)
Parameters
Type Name Description
TListSelect query
SoDataReader reader

The reader which contains all data in the list.

Explicit Interface Implementations

ICollection<TListItem>.Add(TListItem)

Declaration
void ICollection<TListItem>.Add(TListItem item)
Parameters
Type Name Description
TListItem item

ICollection<TListItem>.Clear()

Clears the list.

Declaration
void ICollection<TListItem>.Clear()

ICollection<TListItem>.Remove(TListItem)

Declaration
bool ICollection<TListItem>.Remove(TListItem o)
Parameters
Type Name Description
TListItem o
Returns
Type Description
Boolean

IEnumerable<TListItem>.GetEnumerator()

Declaration
IEnumerator<TListItem> IEnumerable<TListItem>.GetEnumerator()
Returns
Type Description
IEnumerator<TListItem>

IList<TListItem>.get_Item(Int32)

Declaration
TListItem IList<TListItem>.get_Item(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
TListItem

IList<TListItem>.Insert(Int32, TListItem)

Declaration
void IList<TListItem>.Insert(int index, TListItem item)
Parameters
Type Name Description
Int32 index
TListItem item

IList<TListItem>.Item[Int32]

Get the item from the list. The set-property is not supported.

Declaration
TListItem IList<TListItem>.this[] { get; set; }
Parameters
Type Name Description
Int32 index
Returns
Type Description
TListItem
Exceptions
Type Condition
SoNotImplementedException

Thrown when trying to access the set property.

IList<TListItem>.RemoveAt(Int32)

Declaration
void IList<TListItem>.RemoveAt(int index)
Parameters
Type Name Description
Int32 index

IList<TListItem>.set_Item(Int32, TListItem)

Declaration
void IList<TListItem>.set_Item(int index, TListItem value)
Parameters
Type Name Description
Int32 index
TListItem value

ICollection.IsSynchronized

IsSynchronized

Declaration
bool ICollection.IsSynchronized { get; }
Returns
Type Description
Boolean

ICollection.SyncRoot

SyncRoot

Declaration
object ICollection.SyncRoot { get; }
Returns
Type Description
Object

IList.Add(Object)

Not implemented, lists inheriting ListBase are read-only. Throws an SoNotImplementedException if used. Add(Object)

Declaration
int IList.Add(object o)
Parameters
Type Name Description
Object o
Returns
Type Description
Int32

IList.Clear()

Clears the list. Clear()

Declaration
void IList.Clear()

IList.Contains(Object)

Checks if the list contains the object or not. Implemented in classes inheriting ListBase. Contains(Object)

Declaration
bool IList.Contains(object o)
Parameters
Type Name Description
Object o

The object to locate in the Array.

Returns
Type Description
Boolean

True if value is found in the Array; otherwise, False

IList.get_Item(Int32)

Declaration
object IList.get_Item(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
Object

IList.IndexOf(Object)

Returns the object at the given index. Implemented in classes inheriting ListBase. IndexOf(Object)

Declaration
int IList.IndexOf(object o)
Parameters
Type Name Description
Object o

The object

Returns
Type Description
Int32

The index of the object.

IList.Insert(Int32, Object)

Not implemented, lists inheriting ListBase are read-only. Throws an SoNotImplementedException if used. Insert(Int32, Object)

Declaration
void IList.Insert(int i, object o)
Parameters
Type Name Description
Int32 i
Object o

IList.Item[Int32]

Get the item from the list. The set-property is not supported.

Declaration
object IList.this[] { get; set; }
Parameters
Type Name Description
Int32 index
Returns
Type Description
Object
Exceptions
Type Condition
SoNotImplementedException

Thrown when trying to access the set property.

IList.Remove(Object)

Not implemented, lists inheriting ListBase are read-only. Throws an SoNotImplementedException if used. Remove(Object)

Declaration
void IList.Remove(object o)
Parameters
Type Name Description
Object o

IList.RemoveAt(Int32)

Not implemented, lists inheriting ListBase are read-only. Throws an SoNotImplementedException if used. RemoveAt(Int32)

Declaration
void IList.RemoveAt(int index)
Parameters
Type Name Description
Int32 index

IList.set_Item(Int32, Object)

Declaration
void IList.set_Item(int index, object value)
Parameters
Type Name Description
Int32 index
Object value

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
IEnumerableExtensions.ForEach<T>(System.Collections.Generic.IEnumerable<T>, System.Action<T>)
IEnumerableExtensions.ContainsAny<T>(System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IEnumerable<T>)
IEnumerableExtensions.Batch<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, T, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, System.Func<T, System.Boolean>, System.Int32)
IEnumerableExtensions.Permute<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>, System.Collections.Generic.IEqualityComparer<K>)
IEnumerableExtensions.GetDifferentCombinations<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
CollectionOps.AtLeastOne<T>(IEnumerable<T>)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top