Show / Hide Table of Contents

Class IArchiverProviderHasRowsExtensions

Inheritance
object
IArchiverProviderHasRowsExtensions
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
public static class IArchiverProviderHasRowsExtensions

Methods

GetRowsAsync(IArchiveProviderHasRows, CancellationToken)

Start the query and return an iterator. The .Current property will be a valid ArchiveRow containing one row, as long as a previous call to .MoveNext returned true. This is the standard semantics for an iterator. Do remember to call Close afterwards, to clean up all resources.

Declaration
public static IAsyncEnumerable<ArchiveRow> GetRowsAsync(this IArchiveProviderHasRows archiveProviderHasRows, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IArchiveProviderHasRows archiveProviderHasRows
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<ArchiveRow>

An iterator, following the usual conventions. MoveNext will return false when there are no more rows, which can either be because the result set is exhausted, or because the page size has been reached

Remarks

You can use the await foreach keyword to iterate over rows, like this:

IArchiveProvider provider = ArchiveProviderFactory.Create("person");
// not shown - set desired columns, entities, restrictions, paging
await foreach( ArchiveRow row in provider.GetRowsAsync() )
{
	// process row here
}
provider.Close();
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top