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
Inherited Members
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 |
---|---|
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<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 |
---|---|
bool | True if value is found in the Array; otherwise, False |
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)
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 | |
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. |
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. |