Class ExternallyPopulatedList
A simple, flat list of literal values, populated from some external source via a function passed in to constructor. This provider does not carry the attribute and is not registered for a particular list; it is intended to be returned by some other, presumably dynamic, mechanism.
Inherited Members
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public sealed class ExternallyPopulatedList : ISoListProvider, ISoList
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
Constructors
ExternallyPopulatedList(string, Func<CancellationToken, IAsyncEnumerable<SoListItem>>)
A simple, flat list of literal values, populated from some external source via a function passed in to constructor. This provider does not carry the attribute and is not registered for a particular list; it is intended to be returned by some other, presumably dynamic, mechanism.
Declaration
public ExternallyPopulatedList(string listName, Func<CancellationToken, IAsyncEnumerable<SoListItem>> populateFunction)
Parameters
Type | Name | Description |
---|---|---|
string | listName | |
Func<CancellationToken, IAsyncEnumerable<SoListItem>> | populateFunction |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
Properties
HistoryInfo
History information for the supported list
Declaration
public HistoryInfo HistoryInfo { get; }
Property Value
Type | Description |
---|---|
HistoryInfo |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
Methods
ClearHistoryItems()
Clears the history items
Declaration
public void ClearHistoryItems()
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)
Calls the populateFunction passed in to the constructor
Declaration
public Task ConstructAsync(string listName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | listName | |
string | additionalInfo | |
int[] | historyIDs | |
bool | onlyReadHistory | |
string | searchValue | |
bool | forceFlatList | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
GetHeadingItemsAsync(CancellationToken)
list of headings
Declaration
public Task<List<ISoListHeading>> GetHeadingItemsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ISoListHeading>> |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
GetHistoryItemsAsync(CancellationToken)
list of history items
Declaration
public Task<List<ISoListItem>> GetHistoryItemsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ISoListItem>> |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.
GetRootItemsAsync(CancellationToken)
list of root-level items (items not under any heading)
Declaration
public Task<List<ISoListItem>> GetRootItemsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ISoListItem>> |
Remarks
Constructor saves function for later. Function is executed during Construct call. This keeps slow list population away from the constructor, which keeps locking short. Avoids blocking the factory.