Show / Hide Table of Contents

Class CriteriaProvider

Inheritance
object
InMemoryProviderBase<ArchiveCriteriaRow>
CriteriaProvider
Implements
IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities
Inherited Members
InMemoryProviderBase<ArchiveCriteriaRow>._entityHelper
InMemoryProviderBase<ArchiveCriteriaRow>.Visible
InMemoryProviderBase<ArchiveCriteriaRow>.Invisible
InMemoryProviderBase<ArchiveCriteriaRow>.AllowOrderBy
InMemoryProviderBase<ArchiveCriteriaRow>.DenyOrderBy
InMemoryProviderBase<ArchiveCriteriaRow>.Options
InMemoryProviderBase<ArchiveCriteriaRow>.RegisterEntity(ArchiveRowTypeInfo)
InMemoryProviderBase<ArchiveCriteriaRow>.GetReaderAsync(string, CancellationToken)
InMemoryProviderBase<ArchiveCriteriaRow>.GetResultInformationAsync()
InMemoryProviderBase<ArchiveCriteriaRow>.SortData(List<ArchiveCriteriaRow>)
InMemoryProviderBase<ArchiveCriteriaRow>.Close()
InMemoryProviderBase<ArchiveCriteriaRow>.SetPagingInfo(int, int)
InMemoryProviderBase<ArchiveCriteriaRow>.GetAvailableColumns()
InMemoryProviderBase<ArchiveCriteriaRow>.SetDesiredColumns(params string[])
InMemoryProviderBase<ArchiveCriteriaRow>.SetOrderBy(params ArchiveOrderByInfo[])
InMemoryProviderBase<ArchiveCriteriaRow>.GetAvailableEntities()
InMemoryProviderBase<ArchiveCriteriaRow>.SetDesiredEntities(params string[])
InMemoryProviderBase<ArchiveCriteriaRow>.EntityHelper
InMemoryProviderBase<ArchiveCriteriaRow>.ColumnHelper
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[ArchiveProvider("Criteria", 1073741823)]
public class CriteriaProvider : InMemoryProviderBase<ArchiveCriteriaRow>, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities

Fields

EntityName

Declaration
public const string EntityName = "criteria"
Field Value
Type Description
string

ProviderName

Declaration
public const string ProviderName = "Criteria"
Field Value
Type Description
string

_colActive

Declaration
protected ArchiveColumnInfo _colActive
Field Value
Type Description
ArchiveColumnInfo

_colCriterion

Declaration
protected ArchiveColumnInfo _colCriterion
Field Value
Type Description
ArchiveColumnInfo

_colIcon

Declaration
protected ArchiveColumnInfo _colIcon
Field Value
Type Description
ArchiveColumnInfo

_colKey

Declaration
protected ArchiveColumnInfo _colKey
Field Value
Type Description
ArchiveColumnInfo

_colOperator

Declaration
protected ArchiveColumnInfo _colOperator
Field Value
Type Description
ArchiveColumnInfo

_colValue

Declaration
protected ArchiveColumnInfo _colValue
Field Value
Type Description
ArchiveColumnInfo

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 override bool BaseClassShouldFilterColumns { get; }
Property Value
Type Description
bool
Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.BaseClassShouldFilterColumns
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 override bool BaseClassShouldFilterEntities { get; }
Property Value
Type Description
bool
Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.BaseClassShouldFilterEntities
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 override bool BaseClassShouldPage { get; }
Property Value
Type Description
bool
Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.BaseClassShouldPage
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

We should keep the sort from the rank in the database and not let the base class sort this.

Declaration
protected override bool BaseClassShouldSort { get; }
Property Value
Type Description
bool
Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.BaseClassShouldSort

Methods

GetResultDataAsync(CancellationToken)

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

Declaration
protected override IAsyncEnumerable<ArchiveCriteriaRow> GetResultDataAsync(CancellationToken _ = default)
Parameters
Type Name Description
CancellationToken _
Returns
Type Description
IAsyncEnumerable<ArchiveCriteriaRow>

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

Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.GetResultDataAsync(CancellationToken)

GetRowsAsync(string, CancellationToken)

Declaration
public IAsyncEnumerable<ArchiveCriteriaRow> GetRowsAsync(string options, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string options
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<ArchiveCriteriaRow>

GetStandardColumnNames()

Declaration
public string[] GetStandardColumnNames()
Returns
Type Description
string[]

SetAdditionalColumns(params string[])

Declaration
public void SetAdditionalColumns(params string[] additionalColumns)
Parameters
Type Name Description
string[] additionalColumns

SetRestriction(params ArchiveRestrictionInfo[])

Set query restriction globally, supersedes previous restrictions

Declaration
public override bool SetRestriction(params ArchiveRestrictionInfo[] restrictions)
Parameters
Type Name Description
ArchiveRestrictionInfo[] restrictions

Array of restrictions, with an implicit AND between them

Returns
Type Description
bool

true if at least one of the restrictions matched one of the available columns of the provider

Overrides
InMemoryProviderBase<ArchiveCriteriaRow>.SetRestriction(params ArchiveRestrictionInfo[])

Implements

IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
IArchiverProviderHasRowsExtensions.GetRowsAsync(IArchiveProviderHasRows, CancellationToken)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top