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
ListBase<TListSelect, TListItem>
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()
Declaration
Properties
Count
Get the number of elements contained in the underlying collection.
Declaration
public int Count { get; }
Property Value
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
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
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)
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
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()
Declaration
void ICollection<TListItem>.Clear()
ICollection<TListItem>.Remove(TListItem)
Declaration
bool ICollection<TListItem>.Remove(TListItem o)
Parameters
Type |
Name |
Description |
TListItem |
o |
|
Returns
IEnumerable<TListItem>.GetEnumerator()
Declaration
IEnumerator<TListItem> IEnumerable<TListItem>.GetEnumerator()
Returns
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
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
Declaration
bool ICollection.IsSynchronized { get; }
Returns
ICollection.SyncRoot
Declaration
object ICollection.SyncRoot { get; }
Returns
IList.Add(Object)
Not implemented, lists inheriting ListBase are read-only.
Throws an SoNotImplementedException if used.
Add(Object)
Declaration
Parameters
Type |
Name |
Description |
Object |
o |
|
Returns
IList.Clear()
Declaration
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
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
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
Exceptions
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
Implements
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)