Show / Hide Table of Contents

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.

Inheritance
Object
ExtensibleHelper
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public class ExtensibleHelper

Constructors

ExtensibleHelper(IArchiveProviderExtensible)

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
Int32

DebugXML

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
Boolean

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
Boolean

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()

PopulateRowFromReader(SoDataReader, ArchiveRow)

Invoke the PopulateRowFromReader method on all known extenders

Declaration
public void PopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
Type Name Description
SoDataReader reader

Data reader with one row of the query result

ArchiveRow row

Archive data row being built

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
Boolean

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

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