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
ICollection
IEnumerable
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOfficeCRMLists
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
int

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
bool

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
bool

this[int]

Get the ListItemBase in the collection from the list.

Declaration
public TListItem this[int index] { get; }
Parameters
Type Name Description
int 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

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
bool

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

CopyTo(Array, int)

CopyTo(Array, int)

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

The array

int index

The array index

CopyTo(TListItem[], int)

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

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
int

The index of the object.

OnLoadAsync(TListSelect, SoDataReader, CancellationToken)

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

Declaration
protected virtual Task OnLoadAsync(TListSelect query, SoDataReader reader, CancellationToken cancellationToken)
Parameters
Type Name Description
TListSelect query
SoDataReader reader

The reader which contains all data in the list.

CancellationToken cancellationToken
Returns
Type Description
Task

Implements

IList
ICollection
IList<T>
ICollection<T>
IEnumerable<T>
IEnumerable

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