public CreateInstance ( Node parent ) : Node | ||
parent | Node | |
Результат | Node |
// -------------------------------------------------------------------------------- Node Factory public static Node CreateInstance(string nodeTypeName, Node parent) { if (nodeTypeName == null) { throw new ArgumentNullException("nodeTypeName"); } if (nodeTypeName.Length == 0) { throw new ArgumentOutOfRangeException("nodeTypeName", "Argument cannot be empty"); } NodeType nodeType = NodeTypeManager.Current.NodeTypes[nodeTypeName]; if (nodeType == null) { throw new ApplicationException(String.Concat("NodeType not found: ", nodeTypeName)); } return(nodeType.CreateInstance(parent)); }