Show / Hide Table of Contents

Class InMemoryProviderBase<RowType>

Inheritance
Object
InMemoryProviderBase<RowType>
AppointmentNotificationProvider
CredentialUserProvider
CriteriaProvider
FindProductViaConnectorProvider
FreetextCountProvider
MappedPreferenceProvider
ParticipantsProvider
QuoteConnectorProvider
TypedInMemoryProviderBase<RowType>
Implements
IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public abstract class InMemoryProviderBase<RowType> : Object, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities, IPlugin where RowType : ArchiveRow, new()
Type Parameters
Name Description
RowType

Constructors

InMemoryProviderBase()

Declaration
protected InMemoryProviderBase()

Fields

_entityHelper

Declaration
protected EntityHelper _entityHelper
Field Value
Type Description
EntityHelper

AllowOrderBy

Symbolic boolean constant for ArchiveColumnInfo constructor, evaluates to 'true'

Declaration
protected const bool AllowOrderBy = true
Field Value
Type Description
Boolean

DenyOrderBy

Symbolic boolean constant for ArchiveColumnInfo constructor, evaluates to 'false'

Declaration
protected const bool DenyOrderBy = false
Field Value
Type Description
Boolean

Invisible

Symbolic boolean constant for ArchiveColumnInfo constructor, evaluates to 'false'

Declaration
protected const bool Invisible = false
Field Value
Type Description
Boolean

Options

Options from GetRows() call

Declaration
protected string Options
Field Value
Type Description
String

Visible

Symbolic boolean constant for ArchiveColumnInfo constructor, evaluates to 'true'

Declaration
protected const bool Visible = true
Field Value
Type Description
Boolean

Properties

BaseClassShouldFilterColumns

Subclass contract: Return true if the base class should filter columns according to SetDesiredColumns. If this property is false, the actual ArchiveRow objects are returned; otherwise a typed copy is made and ColumnData are populated accoprding to DesiredColumns.

Declaration
protected abstract bool BaseClassShouldFilterColumns { get; }
Property Value
Type Description
Boolean
Remarks

If columns are cheap to get, the subclass can save code by leaving the filtering to this base class. Conversely, if somecolumns are expensive to calculate, the subclass should do the filtering itself to improve performance.

BaseClassShouldFilterEntities

Subclass contract: Return true if the base class should filter columns according to SetDesiredColumns. If this property is false, the actual ArchiveRow objects are returned; otherwise a typed copy is made and ColumnData are populated accoprding to DesiredColumns.

Declaration
protected abstract bool BaseClassShouldFilterEntities { get; }
Property Value
Type Description
Boolean
Remarks

If columns are cheap to get, the subclass can save code by leaving the filtering to this base class. Conversely, if somecolumns are expensive to calculate, the subclass should do the filtering itself to improve performance.

BaseClassShouldPage

Subclass contract: Return true if the base class should perform filter entities according to SetDesiredEntities. If this property is false, the result set is assumed to represent the chosen entities only.

Declaration
protected abstract bool BaseClassShouldPage { get; }
Property Value
Type Description
Boolean
Remarks

If rows are cheap to get, the subclass can save code by leaving the filtering to this base class. Conversely, if rows are expensive to calculate, the subclass should do the entity filtering itself to improve performance.

BaseClassShouldSort

Subclass contract: Return true if the base class should perform sorting according to SetOrderBy. If this property is false, the result set is assumed to be correctly ordered.

Declaration
protected abstract bool BaseClassShouldSort { get; }
Property Value
Type Description
Boolean

ColumnHelper

Declaration
protected ColumnHelper ColumnHelper { get; }
Property Value
Type Description
ColumnHelper

EntityHelper

Declaration
protected EntityHelper EntityHelper { get; }
Property Value
Type Description
EntityHelper

Methods

Close()

Declaration
public virtual void Close()

GetAvailableColumns()

Declaration
public virtual List<ArchiveColumnInfo> GetAvailableColumns()
Returns
Type Description
List<ArchiveColumnInfo>

GetAvailableEntities()

Declaration
public virtual List<ArchiveRowTypeInfo> GetAvailableEntities()
Returns
Type Description
List<ArchiveRowTypeInfo>

GetReader(String)

Declaration
public virtual IDataReader GetReader(string options)
Parameters
Type Name Description
String options
Returns
Type Description
IDataReader

GetResultData()

Subclass contract: Return a list of ArchiveRow items that are the current result

Declaration
protected abstract List<RowType> GetResultData()
Returns
Type Description
List<RowType>

result list, which may be paged, sorted and column-filtered, or not, according to the abstract properties

GetResultInformation()

Declaration
public virtual ArchiveResultInformation GetResultInformation()
Returns
Type Description
ArchiveResultInformation

GetRows(String)

Declaration
public virtual IEnumerable<ArchiveRow> GetRows(string options)
Parameters
Type Name Description
String options
Returns
Type Description
IEnumerable<ArchiveRow>

RegisterEntity(ArchiveRowTypeInfo)

Register an entity on this provider

Declaration
protected ArchiveRowTypeInfo RegisterEntity(ArchiveRowTypeInfo entity)
Parameters
Type Name Description
ArchiveRowTypeInfo entity

Entity to register

Returns
Type Description
ArchiveRowTypeInfo

The same entity, so you can go on doing things to it

SetDesiredColumns(String[])

Declaration
public virtual void SetDesiredColumns(params string[] columnIds)
Parameters
Type Name Description
String[] columnIds

SetDesiredEntities(String[])

Declaration
public virtual void SetDesiredEntities(params string[] entities)
Parameters
Type Name Description
String[] entities

SetOrderBy(ArchiveOrderByInfo[])

Declaration
public virtual void SetOrderBy(params ArchiveOrderByInfo[] orderBy)
Parameters
Type Name Description
ArchiveOrderByInfo[] orderBy

SetPagingInfo(Int32, Int32)

Declaration
public virtual void SetPagingInfo(int pageSize, int pageNumber)
Parameters
Type Name Description
Int32 pageSize
Int32 pageNumber

SetRestriction(ArchiveRestrictionInfo[])

Declaration
public virtual bool SetRestriction(params ArchiveRestrictionInfo[] restrictions)
Parameters
Type Name Description
ArchiveRestrictionInfo[] restrictions
Returns
Type Description
Boolean

SortData(List<RowType>)

Sort the given list of archive rows according to the current orderby criteria

Declaration
protected void SortData(List<RowType> dataToSort)
Parameters
Type Name Description
List<RowType> dataToSort

Implements

IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities

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