本文整理汇总了C#中IScanner.genLowestKeyTest方法的典型用法代码示例。如果您正苦于以下问题:C# IScanner.genLowestKeyTest方法的具体用法?C# IScanner.genLowestKeyTest怎么用?C# IScanner.genLowestKeyTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScanner
的用法示例。
在下文中一共展示了IScanner.genLowestKeyTest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: scanBackward
public IEnumerable<KeyValuePair<RecordKey, RecordData>> scanBackward(IScanner<RecordKey> scanner)
{
var new_scanner = new ScanRange<RecordKey>(
new RecordKeyComparator().appendKeyPart(this.subset_name).appendKeyPart(scanner.genLowestKeyTest()),
new RecordKeyComparator().appendKeyPart(this.subset_name).appendKeyPart(scanner.genHighestKeyTest()), null);
foreach (var rec in next_stage.scanBackward(new_scanner)) {
if (this.subset_name.CompareTo(rec.Key.key_parts[0]) != 0) {
// Console.WriteLine("SubsetStage.scanBackward: no more records");
yield break;
}
RecordKeyType_RecordKey orig_key = (RecordKeyType_RecordKey)rec.Key.key_parts[1];
yield return new KeyValuePair<RecordKey, RecordData>(orig_key.GetRecordKey(), rec.Value);
}
}
示例2: scanBackward
public IEnumerable<KeyValuePair<RecordKey, RecordUpdate>> scanBackward(IScanner<RecordKey> scanner)
{
IComparable<RecordKey> lowkeytest = scanner.genLowestKeyTest();
IComparable<RecordKey> highkeytest = scanner.genHighestKeyTest();
RecordLocator rloc = _findRecord(highkeytest, true).before_keytest;
while (rloc.have_record && // while we have a new record to test
(lowkeytest.CompareTo(rloc.record.Key) < 0)) // and it's above the lowkey
{
if (scanner.MatchTo(rloc.record.Key)) {
yield return rloc.record;
}
_prevRecord(ref rloc);
}
}