本文整理汇总了C#中Cursor.MoveLast方法的典型用法代码示例。如果您正苦于以下问题:C# Cursor.MoveLast方法的具体用法?C# Cursor.MoveLast怎么用?C# Cursor.MoveLast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cursor
的用法示例。
在下文中一共展示了Cursor.MoveLast方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoveCursorToPrev
/*
* Move the cursor to previous record in the database.
* The returning value should be true;
*/
public void MoveCursorToPrev(Cursor dbc,
LockingInfo lck)
{
if (lck == null)
{
dbc.MoveLast();
for (int i = 0; i < 5; i++)
Assert.IsTrue(dbc.MovePrev());
}
else
{
dbc.MoveLast(lck);
for (int i = 0; i < 5; i++)
Assert.IsTrue(dbc.MovePrev(lck));
}
}
示例2: MoveCursorToPrev
/*
* Move the cursor to previous record in the database.
* The returning value should be true;
*/
public void MoveCursorToPrev(Cursor dbc,
uint kOffset, uint kLen,
uint dOffset, uint dLen, LockingInfo lck)
{
if (lck == null) {
dbc.MoveLast();
for (int i = 0; i < 5; i++) {
Assert.IsTrue(dbc.MovePrev());
dbc.MoveNext();
Assert.IsTrue(dbc.MovePrev(
new DatabaseEntry(kOffset, kLen),
new DatabaseEntry(dOffset, dLen)));
CheckPartial(
dbc.Current.Key, kOffset, kLen,
dbc.Current.Value, dOffset, dLen);
}
} else {
dbc.MoveLast(lck);
for (int i = 0; i < 5; i++) {
Assert.IsTrue(dbc.MovePrev(lck));
dbc.MoveNext();
Assert.IsTrue(dbc.MovePrev(
new DatabaseEntry(kOffset, kLen),
new DatabaseEntry(dOffset, dLen),
lck));
CheckPartial(
dbc.Current.Key, kOffset, kLen,
dbc.Current.Value, dOffset, dLen);
}
}
}
示例3: MoveCursorToLast
/*
* Move the cursor to last record in a nonempty
* database. The returning value should be true.
*/
public void MoveCursorToLast(Cursor dbc, LockingInfo lck)
{
if (lck == null)
Assert.IsTrue(dbc.MoveLast());
else
Assert.IsTrue(dbc.MoveLast(lck));
}
示例4: MoveCursorToLast
/*
* Move the cursor to last record in a nonempty
* database. The returning value should be true.
*/
public void MoveCursorToLast(Cursor dbc,
uint kOffset, uint kLen,
uint dOffset, uint dLen, LockingInfo lck)
{
DatabaseEntry key = new DatabaseEntry(kOffset, kLen);
DatabaseEntry data = new DatabaseEntry(dOffset, dLen);
if (lck == null) {
Assert.IsTrue(dbc.MoveLast());
Assert.IsTrue(dbc.MoveLast(key, data));
} else {
Assert.IsTrue(dbc.MoveLast(lck));
Assert.IsTrue(dbc.MoveLast(key, data, lck));
}
CheckPartial(dbc.Current.Key, kOffset, kLen,
dbc.Current.Value, dOffset, dLen);
}