当前位置: 首页>>代码示例>>C#>>正文


C# NeoDatis.GetKey方法代码示例

本文整理汇总了C#中NeoDatis.GetKey方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetKey方法的具体用法?C# NeoDatis.GetKey怎么用?C# NeoDatis.GetKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NeoDatis的用法示例。


在下文中一共展示了NeoDatis.GetKey方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckValuesOfChild

		private static void CheckValuesOfChild(NeoDatis.Btree.IKeyAndValue key, NeoDatis.Btree.IBTreeNode
			 node)
		{
			if (!on)
			{
				return;
			}
			if (node == null)
			{
				return;
			}
			for (int i = 0; i < node.GetNbKeys(); i++)
			{
				if (node.GetKeyAndValueAt(i).GetKey().CompareTo(key.GetKey()) >= 0)
				{
					throw new NeoDatis.Btree.Exception.BTreeNodeValidationException("Left child with values bigger than pivot "
						 + key + " : " + node.ToString());
				}
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:20,代码来源:BTreeValidator.cs

示例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();
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:36,代码来源:BTreeNodeMultipleValuesPerKey.cs

示例3: SetKeyAndValueAt

		public virtual void SetKeyAndValueAt(NeoDatis.Btree.IKeyAndValue keyAndValue, int
			 index, bool shiftIfAlreadyExist, bool incrementNbKeys)
		{
			SetKeyAndValueAt(keyAndValue.GetKey(), keyAndValue.GetValue(), index, shiftIfAlreadyExist
				, incrementNbKeys);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:6,代码来源:AbstractBTreeNode.cs

示例4: DeleteKeyForLeafNode

		public virtual object DeleteKeyForLeafNode(NeoDatis.Btree.IKeyAndValue keyAndValue
			)
		{
			int position = GetPositionOfKey(keyAndValue.GetKey());
			if (position < 0)
			{
				return null;
			}
			int realPosition = position - 1;
			object value = values[realPosition];
			LeftShiftFrom(realPosition, false);
			nbKeys--;
			NeoDatis.Btree.Tool.BTreeValidator.ValidateNode(this);
			return value;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:15,代码来源:AbstractBTreeNode.cs


注:本文中的NeoDatis.GetKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。