Class MDOProviderBase
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Inheritance
MDOProviderBase
Assembly: SoDataBase.dll
Syntax
public abstract class MDOProviderBase : ISoListProvider, ISoList, IEnumerable<ISoListItem>, IEnumerable
Constructors
MDOProviderBase()
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected MDOProviderBase()
Fields
_declaredListName
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected string _declaredListName
Field Value
_forceFlatList
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected bool _forceFlatList
Field Value
_headingCollection
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected List<ISoListHeading> _headingCollection
Field Value
_historyCollection
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected List<ISoListItem> _historyCollection
Field Value
_historyIds
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected int[] _historyIds
Field Value
_listInfo
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected ListInfo _listInfo
Field Value
_listName
The name of the list. Used to identify mdo-list entries in the UserPreference-table.
Declaration
protected string _listName
Field Value
_nodeType
Declaration
protected MDOListElementType _nodeType
Field Value
_rootCollection
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected List<ISoListItem> _rootCollection
Field Value
_searchValue
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected string _searchValue
Field Value
_tableListInfo
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected TableInfo _tableListInfo
Field Value
_tableName
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected string _tableName
Field Value
_tableRows
Declaration
protected ListTableRows _tableRows
Field Value
Properties
HistoryInfo
History information for the supported list
Declaration
public abstract HistoryInfo HistoryInfo { get; }
Property Value
IncludeDeletedItems
Should items with the Deleted flag be included in the search. Default is false. Must be set before running the queries!
Declaration
public bool IncludeDeletedItems { get; set; }
Property Value
InhibitResortOnFlattening
If a heading-grouped list becomes flattened, it is usually resorted according to the current list preference.
Some providers may not want that, if they already have made some evaluations of what is going on. Setting this properties
will cause the resorting to be skipped.
Declaration
public bool InhibitResortOnFlattening { get; set; }
Property Value
IsFinalListFlat
After population, this property will tell us if the final list is actually flat or not
Declaration
protected bool IsFinalListFlat { get; }
Property Value
Methods
AcceptHistoryRow(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual bool AcceptHistoryRow(ListTableRow row)
Parameters
Returns
AddGroupLinkJoin(int[], CustomSearch)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual void AddGroupLinkJoin(int[] selectedIds, ListTableRows.CustomSearch query)
Parameters
AddSimpleListOrderByAsync(CustomSearch, CancellationToken)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual Task AddSimpleListOrderByAsync(ListTableRows.CustomSearch query, CancellationToken cancellationToken)
Parameters
Returns
BuildMdoCollectionsAsync(CancellationToken)
Convert rows object to ISoList collections
Declaration
protected virtual Task BuildMdoCollectionsAsync(CancellationToken cancellationToken)
Parameters
Returns
ClearHistoryItems()
Declaration
public void ClearHistoryItems()
ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)
Initializes all class members.
Declaration
public virtual Task ConstructAsync(string tableName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList, CancellationToken cancellationToken = default)
Parameters
| Type |
Name |
Description |
| string |
tableName |
Name of the table holding the MDO list values, like Category, Business, etc. Note that this really has to be a valid table name.
|
| string |
additionalInfo |
|
| int[] |
historyIDs |
List of history id's (primary keys of the table holding the MDO list values).
|
| bool |
onlyReadHistory |
Only read history nodes.
|
| string |
searchValue |
Search value (case insensetive string used like '%[searchValue]%'. The result when using this is allways a flat list without hisotry elements.
|
| bool |
forceFlatList |
State that a forced flat list should be returned.
|
| CancellationToken |
cancellationToken |
|
Returns
FillListAsync(CancellationToken)
Fills the MDO-list with data.
Declaration
protected virtual Task FillListAsync(CancellationToken cancellationToken)
Parameters
Returns
GetGroupingAllowedForListAsync(CancellationToken)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual Task<bool> GetGroupingAllowedForListAsync(CancellationToken cancellationToken)
Parameters
Returns
GetHeadingIconHint(ListTableRow)
Get a value for the field IconHint in ISoList for a heading element
Declaration
protected virtual string GetHeadingIconHint(ListTableRow row)
Parameters
| Type |
Name |
Description |
| ListTableRow |
row |
The actual row for which the item is created
|
Returns
| Type |
Description |
| string |
An icon hint text
|
GetHeadingItemsAsync(CancellationToken)
Declaration
public Task<List<ISoListHeading>> GetHeadingItemsAsync(CancellationToken cancellationToken = default)
Parameters
Returns
GetHeadingType(ListTableRow)
Get a value for the field Type in ISoList for a heading element
Declaration
protected virtual string GetHeadingType(ListTableRow row)
Parameters
| Type |
Name |
Description |
| ListTableRow |
row |
The actual row for which the item is created
|
Returns
GetHistoryCollectionAsync(CancellationToken)
Builds the history-node collection.
Declaration
protected virtual Task<ListTableRows.CustomSearch> GetHistoryCollectionAsync(CancellationToken cancellationToken)
Parameters
Returns
GetHistoryIconHint(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual Task<string> GetHistoryIconHint(ListTableRow row)
Parameters
Returns
GetHistoryItemsAsync(CancellationToken)
Declaration
public Task<List<ISoListItem>> GetHistoryItemsAsync(CancellationToken cancellationToken = default)
Parameters
Returns
GetItemColor(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual int GetItemColor(ListTableRow row)
Parameters
Returns
GetItemDeleted(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual bool GetItemDeleted(ListTableRow row)
Parameters
Returns
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual string GetItemExtraInfo(ListTableRow row)
Parameters
Returns
GetItemIconHint(ListTableRow)
Get a value for the field IconHint in ISoList for an item element
Declaration
protected virtual string GetItemIconHint(ListTableRow row)
Parameters
| Type |
Name |
Description |
| ListTableRow |
row |
The actual row for which the item is created
|
Returns
| Type |
Description |
| string |
An icon hint text
|
GetItemId(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual int GetItemId(ListTableRow row)
Parameters
Returns
GetItemName(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual string GetItemName(ListTableRow row)
Parameters
Returns
GetItemRank(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual short GetItemRank(ListTableRow row)
Parameters
Returns
GetItemStyleHint(ListTableRow)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual string GetItemStyleHint(ListTableRow row)
Parameters
Returns
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual string GetItemTooltip(ListTableRow row)
Parameters
Returns
GetItemType(ListTableRow)
Get a value for the field Type in ISoList for an item element
Declaration
protected virtual string GetItemType(ListTableRow row)
Parameters
| Type |
Name |
Description |
| ListTableRow |
row |
The actual row for which the item is created
|
Returns
| Type |
Description |
| string |
The type of the list item
|
GetItemsAndHeadingsQueryAsync(bool, CancellationToken, params int[])
Create a query for for reading the items and headings of a list.
Declaration
protected virtual Task<ListTableRows.CustomSearch> GetItemsAndHeadingsQueryAsync(bool bFlattened, CancellationToken cancellationToken, params int[] selectedIds)
Parameters
| Type |
Name |
Description |
| bool |
bFlattened |
Force the list to be flattened.
|
| CancellationToken |
cancellationToken |
|
| int[] |
selectedIds |
Id's in the list that will be forced to be included, regardless of other filtering.
|
Returns
Remarks
GetItemsAndHeadingsQueryAsync(CancellationToken)
Create a query for for reading the items and headings of a list.
Declaration
protected virtual Task<ListTableRows.CustomSearch> GetItemsAndHeadingsQueryAsync(CancellationToken cancellationToken)
Parameters
Returns
Remarks
GetListLowerLimitAsync(CancellationToken)
How many items must there be in the list before we go into MDO-list mode?
Declaration
protected virtual Task<int> GetListLowerLimitAsync(CancellationToken cancellationToken)
Parameters
Returns
| Type |
Description |
| Task<int> |
the lower limit for this list
|
GetPreferredSortOrderAsync(CancellationToken)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual Task<MDOSortOrder> GetPreferredSortOrderAsync(CancellationToken cancellationToken)
Parameters
Returns
GetRootItemsAsync(CancellationToken)
list of root-level items (items not under any heading)
Declaration
public Task<List<ISoListItem>> GetRootItemsAsync(CancellationToken cancellationToken = default)
Parameters
Returns
GetSimpleListQueryAsync(CancellationToken)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual Task<ListTableRows.CustomSearch> GetSimpleListQueryAsync(CancellationToken cancellationToken)
Parameters
Returns
OnAddHeadingElementToCollection(SoListHeading)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual void OnAddHeadingElementToCollection(SoListHeading heading)
Parameters
OnAddHistoryElementToCollection(SoListItem)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual void OnAddHistoryElementToCollection(SoListItem item)
Parameters
OnAddRootElementToCollection(SoListItem)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual void OnAddRootElementToCollection(SoListItem item)
Parameters
OnAddSubItemToCollection(SoListItem, List<ISoListItem>)
Base class for MDO List providers. This class knows about MDO
lists and History, in addition to the knowledge provided by
the FilteredListProviderBase base class.
Declaration
protected virtual void OnAddSubItemToCollection(SoListItem item, List<ISoListItem> headingItemsCollection)
Parameters
ReadItemsAndHeadingsAsync(CancellationToken)
Read all mdo items with heading information
Declaration
protected virtual Task ReadItemsAndHeadingsAsync(CancellationToken cancellationToken)
Parameters
Returns
ReadSimpleListAsync(CancellationToken)
ReadSimpleList reads the root-nodes and adds them to the list.
A simple list has no grouping or heading.
Declaration
protected virtual Task ReadSimpleListAsync(CancellationToken cancellationToken)
Parameters
Returns
ResortFlattenedListAsync(CancellationToken)
Resort a list that has been flattened.
Declaration
protected virtual Task ResortFlattenedListAsync(CancellationToken cancellationToken)
Parameters
Returns
Implements
Extension Methods