public Node CreateSubNode(int key) { if (key < 0) throw new RepositoryException("negative key not allowed"); if (_subNodes == null) _subNodes = new SubNodeWithListOfSubNodes(this); return _subNodes.CreateSubNode(key); }
public Node CreateSubNode(string key) { if (string.IsNullOrEmpty(key)) throw new RepositoryException("null string key not allowed"); if (_subNodes == null) _subNodes = new SubNodeWithDictionaryOfSubNodes(this); return _subNodes.CreateSubNode(key); }