internal NodeType(int id, string name, ISchemaRoot schemaRoot, string className, NodeType parent) : base(id, name, schemaRoot)
{
_declaredPropertyTypes = new TypeCollection<PropertyType>(this.SchemaRoot);
_parent = parent;
_children = new TypeCollection<NodeType>(this.SchemaRoot);
_className = className;
_nodeTypePath = name;
if (parent != null)
{
parent._children.Add(this);
//-- Inherit PropertyTypes
foreach (PropertyType propType in parent.PropertyTypes)
this.PropertyTypes.Add(propType);
_nodeTypePath = String.Concat(parent._nodeTypePath, "/", _nodeTypePath);
}
}