Class ExtensibleHelper
This helper class provides functionality for keeping track of extenders to the client class, i.e., the Extensible property of archive providers. It has the list of current extenders, merges column names, and passes calls such as SetOrderBy to its extenders.
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class ExtensibleHelper
Constructors
ExtensibleHelper(IArchiveProviderExtensible)
This helper class provides functionality for keeping track of extenders to the client class, i.e., the Extensible property of archive providers. It has the list of current extenders, merges column names, and passes calls such as SetOrderBy to its extenders.
Declaration
public ExtensibleHelper(IArchiveProviderExtensible owner)
Parameters
| Type | Name | Description |
|---|---|---|
| IArchiveProviderExtensible | owner |
Properties
Count
Get the number of extenders currently known to the helper
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
DebugXML
This helper class provides functionality for keeping track of extenders to the client class, i.e., the Extensible property of archive providers. It has the list of current extenders, merges column names, and passes calls such as SetOrderBy to its extenders.
Declaration
public XmlDocument DebugXML { get; }
Property Value
| Type | Description |
|---|---|
| XmlDocument |
Methods
AddExtender(IArchiveExtender)
Add an extender class to the client class we work on behalf of
Declaration
public void AddExtender(IArchiveExtender extender)
Parameters
| Type | Name | Description |
|---|---|---|
| IArchiveExtender | extender | Extender to be added |
ExtendersNeedQuery()
Determine if any of the extenders' queries are needed (which generally implies that the provider that is being extended is also needed to avoid gaps in the query join chain).
Declaration
public bool ExtendersNeedQuery()
Returns
| Type | Description |
|---|---|
| bool | true if at least one extender reports that its query is needed |
ExtendersRestrictQuery()
Determine if any of the extenders' queries provide restrictions (which generally implies that the provider that is being extended is also needed to avoid gaps in the query join chain).
Declaration
public bool ExtendersRestrictQuery()
Returns
| Type | Description |
|---|---|
| bool | true if at least one extender reports that its query is needed |
ForceDisable()
Calling this method will disable all extenders. Disabling means that extenders will return 'false' to the IsQueryNeeded and IsQueryRestriction, and will not expect to be called for ModifyQuery or PopulateRowFromReader.
Declaration
public void ForceDisable()
GetExtenders()
Enumerate the extenders known to the helper
Declaration
public IEnumerable<IArchiveExtender> GetExtenders()
Returns
| Type | Description |
|---|---|
| IEnumerable<IArchiveExtender> |
MergeAvailableColumns(List<ArchiveColumnInfo>)
Update and get the list of columns handled by this provider. The incoming parameter is updated with any columns provided by all known extenders, duplicates are ignored, except for having the ability reset CanOrderBy and CanRestrictBy attributes.
Declaration
public void MergeAvailableColumns(List<ArchiveColumnInfo> parentColumns)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ArchiveColumnInfo> | parentColumns | List to be updated |
ModifyQuery()
Invoke the ModifyQuery method on all known extenders
Declaration
public void ModifyQuery()
PopulateRowFromReaderAsync(SoDataReader, ArchiveRow, CancellationToken)
Invoke the PopulateRowFromReader method on all known extenders
Declaration
public Task PopulateRowFromReaderAsync(SoDataReader reader, ArchiveRow row, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SoDataReader | reader | Data reader with one row of the query result |
| ArchiveRow | row | Archive data row being built |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
SetDesiredColumns(string[])
Set which columns should actually be returned. The column list is passed on to all known extenders.
Declaration
public void SetDesiredColumns(string[] columnIds)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | columnIds | Array of column ID's representing the desired columns |
SetOrderBy(ArchiveOrderByInfo[])
Set the order by information. The array of order by items is passed on to all known extenders
Declaration
public void SetOrderBy(ArchiveOrderByInfo[] orderBy)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveOrderByInfo[] | orderBy | Array of order by items |
SetPrefixes(string, string)
Set the name and display name prefixes. The prefixes are passed on to all known extenders
Declaration
public void SetPrefixes(string namePrefix, string displayNamePrefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | namePrefix | Name prefix, can be null or empty |
| string | displayNamePrefix | Display name prefix, can be null or empty |
SetRestriction(ArchiveRestrictionInfo[])
Set the restriction. The array of restrictions is passed on to all known extenders
Declaration
public bool SetRestriction(ArchiveRestrictionInfo[] restrictions)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveRestrictionInfo[] | restrictions |
Returns
| Type | Description |
|---|---|
| bool |
ToString()
This helper class provides functionality for keeping track of extenders to the client class, i.e., the Extensible property of archive providers. It has the list of current extenders, merges column names, and passes calls such as SetOrderBy to its extenders.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |