March 2018
Beginner to intermediate
410 pages
10h 40m
English
If historical values are desired, we can send our partial results immediately, to allow the client to provide some immediate feedback. Loading historical data can take a little time, depending on the underlying storage medium and amount of data stored:
if (e.IsIncluded(FieldType.Historical))
{
e.ReportFields(false, Fields);
Fields.Clear();
To avoid too large stanzas and allow the client to follow the progress, we can choose to return historical elements, 50 at a time:
foreach (LastMinute Rec in await Database.Find<LastMinute>(new FilterAnd( new FilterFieldGreaterOrEqualTo("Timestamp", e.From), new FilterFieldLesserOrEqualTo("Timestamp", e.To)), "Timestamp")) { if (Fields.Count > 50) { e.ReportFields(false, Fields); ...Read now
Unlock full access