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
IEnumerable
IEnumerable<TListItem>
IList
ICollection
IList<TListItem>
ICollection<TListItem>
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public abstract class ListBase<TListSelect, TListItem> : Object, IEnumerable, IEnumerable<TListItem>, IList, ICollection, IList<TListItem>, ICollection<TListItem> 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)

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

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.

Implements

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

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top