public void AddLeaves(ITree tree, IDictionary <string, object> leaves) { if (tree.CurrentBranch == null) { var exception = tree.Leaves.MergeWithRollback((IDictionary)leaves); if (exception != null) { throw exception; } } else { _branchService.AddLeaves(tree.CurrentBranch, leaves); } }