1010data .NET SDK
TenTenSDK.BasicPolicy Class Reference

Enumeration constant window enumeration policy. More...

Inherits TenTenSDK.IDownloadPolicy.

Public Member Functions

 BasicPolicy (int window, int backlog, int rows)
 Constructor. More...
 
int NextWindow (long row)
 Returns the size of the next enumeration window. More...
 
void ForRow (long row, ref long offset, ref int rows)
 Sets the offset and rows for a subscripting. More...
 

Public Attributes

readonly int Window
 The size of the window to use for enumeration.
 
readonly int Backlog
 The number of previous values (from subscripted row) to keep around.
 
readonly int Rows
 The number of total rows to get on subscripting.
 

Detailed Description

Enumeration constant window enumeration policy.

Constructor & Destructor Documentation

TenTenSDK.BasicPolicy.BasicPolicy ( int  window,
int  backlog,
int  rows 
)

Constructor.

Parameters
windowHow large of a window to use for enumeration.
backlogHow many previous values (from subscripted row) to keep around.
rowsHow many rows total to get on subscripting.

Member Function Documentation

void TenTenSDK.BasicPolicy.ForRow ( long  row,
ref long  offset,
ref int  rows 
)

Sets the offset and rows for a subscripting.

Parameters
rowRow being subscripted
offsetFirst row downloaded => first row to download: Math.Max(0, row - this.Backlog)
rowsNumber of rows downloaded => number of rows to download: this.Rows

Implements TenTenSDK.IDownloadPolicy.

int TenTenSDK.BasicPolicy.NextWindow ( long  row)

Returns the size of the next enumeration window.

Parameters
rowThe row being indexed by enumeration
Returns
this.Window.

Implements TenTenSDK.IDownloadPolicy.