public void AddLeaf(ITree tree, string identifier, object leaf) { if (tree.CurrentBranch == null) { tree.Leaves.Add(identifier, leaf); } else { _branchService.AddLeaf(tree.CurrentBranch, identifier, leaf); } }