Show / Hide Table of Contents

Class ShadowSelectionProvider

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Inheritance
object
ShadowSelectionProvider
Implements
IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities
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
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[ArchiveProvider("ShadowSelection", 1073741823)]
public class ShadowSelectionProvider : IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

Fields

ProviderName

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Declaration
public const string ProviderName = "ShadowSelection"
Field Value
Type Description
string
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

_colContactId

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Declaration
protected ArchiveColumnInfo _colContactId
Field Value
Type Description
ArchiveColumnInfo
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

_colPersonId

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Declaration
protected ArchiveColumnInfo _colPersonId
Field Value
Type Description
ArchiveColumnInfo
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

_colSelectionId

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Declaration
protected ArchiveColumnInfo _colSelectionId
Field Value
Type Description
ArchiveColumnInfo
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

Methods

Close()

Call this method after the last desired row has been read; this gives the provider the chance to close and free any underlying queries

Declaration
public void Close()
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetAvailableColumns()

Get the list of columns handled by this provider

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

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetAvailableEntities()

Get the list of entities supported by this provider

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

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetReaderAsync(string, CancellationToken)

Start the provider, returning an IDataReader compatible object to the client for row enumeration and data access

Declaration
public virtual Task<DbDataReader> GetReaderAsync(string options, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string options

Options, passed to the internal GetRows method

CancellationToken cancellationToken
Returns
Type Description
Task<DbDataReader>

IDataReader primed to provide results

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetResultInformationAsync()

Get additional information about the result, such as row count or other optional items. This method should be called after GetRowsAsync(string, CancellationToken), but before Close.

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

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetRowsAsync(string, CancellationToken)

The main function - set up inner provider, transform column names, filter and transform results

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

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

GetSupportedOptions()

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

Declaration
public string[] GetSupportedOptions()
Returns
Type Description
string[]
Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

SetDesiredColumns(params string[])

Set which columns should actually be returned, must be a subset of the GetAvailableColumns result

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

Array of column ID's representing the desired columns

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

SetDesiredEntities(params string[])

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

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

Array of entity names, semantically equivalent to ArchiveEntityInfo.Name fields.

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

SetOrderBy(params ArchiveOrderByInfo[])

Universal shadow selection dispatcher: Retrieve the contactId and/or personId of all contact/person shadow members of any selection

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

Array of order by items

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

SetPagingInfo(int, int)

Set the paging properties of the provider. The default is to fetch page zero, of one thousand (1000) rows. A more reasonable page size is probably around 100. Note that the query processing strategy may change for very large pages (more than 1000) and give significantly longer response times. Performance is improved by setting the page size low, as long as you don't set it lower than what you realistically expect to need (fetching multiple pages is more expensive than fetching one).

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

Desired page size

int pageNumber

Desired page number to return

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

SetRestriction(params ArchiveRestrictionInfo[])

Set query restriction globally, supersedes previous restrictions

Declaration
public 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

Remarks

This class abstracts the differences between the various selection kinds (contact, sale, ...) with regard to contact and person id. You can give any selectionId to this provider, and it will reply with a list of contact and person ids; either pulled from the actual selection (if it's a contact selection) or its shadow.

Only the two ID columns are available. The row type is fixed (contact or person), and the column names are also fixed.

Implements

IArchiveProvider
IArchiveProviderHasRows
IArchiveProviderHasColumns
IArchiveProviderHasEntities

Extension Methods

IArchiverProviderHasRowsExtensions.GetRowsAsync(IArchiveProviderHasRows, CancellationToken)
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