Show / Hide Table of Contents

Class Combinator

Implements the base functionality for combining data from two providers using a specific operator (up to the base classes to decide).

Inheritance
object
Combinator
IntersectCombinator
SimpleCombinator
SubtractCombinator
UnionCombinator
XORCombinator
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists.Archive
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public abstract class Combinator

Constructors

Combinator(IArchiveProvider, IArchiveProvider, CombinedSelectionProviderBase)

Constructor

Declaration
public Combinator(IArchiveProvider left, IArchiveProvider right, CombinedSelectionProviderBase parent)
Parameters
Type Name Description
IArchiveProvider left
IArchiveProvider right
CombinedSelectionProviderBase parent

Fields

_duplicateList

List for duplicate check

Declaration
protected List<long> _duplicateList
Field Value
Type Description
List<long>

_leftProvider

Sub-provider on the left hand side of the combine operation

Declaration
protected IArchiveProvider _leftProvider
Field Value
Type Description
IArchiveProvider

_options

Options for the getRows function

Declaration
protected string _options
Field Value
Type Description
string

_pageNumber

Page number

Declaration
protected int _pageNumber
Field Value
Type Description
int

_pageSize

Page size

Declaration
protected int _pageSize
Field Value
Type Description
int

_parent

Points to the provider using this combinator.

Declaration
protected CombinedSelectionProviderBase _parent
Field Value
Type Description
CombinedSelectionProviderBase

_rightProvider

Sub-provider on the right-hand side of the combination operation

Declaration
protected IArchiveProvider _rightProvider
Field Value
Type Description
IArchiveProvider

_rowComparer

Row comparer

Declaration
protected ArchiveRowIteratorComparer _rowComparer
Field Value
Type Description
ArchiveRowIteratorComparer

_rowCount

Implements the base functionality for combining data from two providers using a specific operator (up to the base classes to decide).

Declaration
protected int _rowCount
Field Value
Type Description
int

Properties

LeftEnum

Returns the enumerator for the left list

Declaration
protected IAsyncEnumerator<ArchiveRow> LeftEnum { get; }
Property Value
Type Description
IAsyncEnumerator<ArchiveRow>

RightEnum

Returns the enumerator for the right list

Declaration
protected IAsyncEnumerator<ArchiveRow> RightEnum { get; }
Property Value
Type Description
IAsyncEnumerator<ArchiveRow>

Methods

DoRowCount(string)

Check if options contains rowcount=true

Declaration
protected bool DoRowCount(string options)
Parameters
Type Name Description
string options
Returns
Type Description
bool

GetResultInformationAsync()

Returns the results-information found when enumerating the rows

Declaration
public virtual Task<ArchiveResultInformation> GetResultInformationAsync()
Returns
Type Description
Task<ArchiveResultInformation>

GetRowKey(ArchiveRow)

Builds a correct row key for the row. This is needed so that rows that combines person and contact gets a combined key ((contactid << 32) + personid)

Declaration
protected long GetRowKey(ArchiveRow row)
Parameters
Type Name Description
ArchiveRow row
Returns
Type Description
long

Either single-entity key, or combined contact/person key. Note that the return value is 64-bit to accomodate two keys

GetRowsAsync(string, CancellationToken)

Returns the enumeration for the combination of the two selections

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

HasDuplicate(ArchiveRow)

Test to see if an item exists in a given list to avoid dupliates. The function will test wether or not the item's key exists in a list, and add the item's key to the list if it doesnt. The list's count will be used to return the number of items in the GetResultInformation method.

Declaration
protected bool HasDuplicate(ArchiveRow row)
Parameters
Type Name Description
ArchiveRow row
Returns
Type Description
bool

SetOrderBy(params ArchiveOrderByInfo[])

Sets the Order by array

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

SetPagingInfo(int, int)

Set paging information.

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

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