public override Node AddChild(NodeType type, string Name) { uint NewId = TableUtils.GetLowestAvailableID(); //creating node: NodeData n = new NodeData() { Name = ValidateName(Name), type = type, ParentID = Id }; TableUtils.WriteToTable(new TableKey() { Table = TableType.Nodes, Node = NewId, Section = 0 }, n); //adding to child list: List<UInt32> Children = TableUtils.GetChildren((uint)Id).ToList(); Children.Add(NewId); TableUtils.SetChildren((uint)Id, Children.ToArray()); return new LocalNode() { Id = (int)NewId }; }
public static void SetNodeData(UInt32 Node, NodeData data) { WriteToTable(new TableKey() { Table = TableType.Nodes, Node = Node, Section = 0 }, data); }