本文整理汇总了C#中NeoDatis.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetValue方法的具体用法?C# NeoDatis.GetValue怎么用?C# NeoDatis.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.GetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetKeyAndValueAt
public virtual void SetKeyAndValueAt(NeoDatis.Btree.IKeyAndValue keyAndValue, int
index, bool shiftIfAlreadyExist, bool incrementNbKeys)
{
SetKeyAndValueAt(keyAndValue.GetKey(), keyAndValue.GetValue(), index, shiftIfAlreadyExist
, incrementNbKeys);
}
示例2: DeleteKeyForLeafNode
public override object DeleteKeyForLeafNode(NeoDatis.Btree.IKeyAndValue keyAndValue
)
{
bool objectHasBeenFound = false;
int position = GetPositionOfKey(keyAndValue.GetKey());
if (position < 0)
{
return null;
}
int realPosition = position - 1;
// In Multiple Values per key, the value is a list
System.Collections.IList value = (System.Collections.IList)values[realPosition];
// Here we must search for the right object. The list can contains more than 1 object
int size = value.Count;
for (int i = 0; i < size && !objectHasBeenFound; i++)
{
if (value[i].Equals(keyAndValue.GetValue()))
{
value.Remove(i);
objectHasBeenFound = true;
}
}
if (!objectHasBeenFound)
{
return null;
}
// If after removal, the list is empty, then remove the key from the node
if (value.Count == 0)
{
// If we get there
LeftShiftFrom(realPosition, false);
nbKeys--;
}
NeoDatis.Btree.Tool.BTreeValidator.ValidateNode(this);
return keyAndValue.GetValue();
}