Show / Hide Table of Contents

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.

Inheritance
object
ExternallyPopulatedList
Implements
ISoListProvider
ISoList
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
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.

Implements

ISoListProvider
ISoList

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