本文整理汇总了C#中NeoDatis.GetRoot方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetRoot方法的具体用法?C# NeoDatis.GetRoot怎么用?C# NeoDatis.GetRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.GetRoot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
public virtual System.Text.StringBuilder Build(NeoDatis.Btree.IBTree btree, bool
withIds)
{
lines = new System.Text.StringBuilder[btree.GetHeight()];
for (int i = 0; i < btree.GetHeight(); i++)
{
lines[i] = new System.Text.StringBuilder();
}
BuildDisplay(btree.GetRoot(), 0, 0, "0", withIds);
BuildRepresentation();
return result;
}
示例2: SaveBTree
public virtual NeoDatis.Odb.OID SaveBTree(NeoDatis.Btree.IBTree treeToSave)
{
nbSaveTree++;
try
{
NeoDatis.Odb.OID oid = (NeoDatis.Odb.OID)treeToSave.GetId();
if (oid == null)
{
// first get the oid. -2 : it could be any value
oid = engine.GetObjectWriter().GetIdManager().GetNextObjectId(-2);
treeToSave.SetId(oid);
oid = engine.Store(oid, treeToSave);
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
{
NeoDatis.Tool.DLogger.Debug("Saved btree " + treeToSave.GetId() + " with id " + oid
+ " and root " + treeToSave.GetRoot());
}
if (this.tree == null)
{
this.tree = treeToSave;
}
oids.Add(oid, treeToSave);
}
else
{
oids.Add(oid, treeToSave);
AddModifiedOid(oid);
}
return oid;
}
catch (System.Exception e)
{
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Btree.BTreeError.InternalError
, e);
}
}