public void ModifyNodeType(NodeType nodeType, NodeType parent)
{
if (nodeType == null)
{
throw new ArgumentNullException("nodeType");
}
if (nodeType.SchemaRoot != this)
{
throw new SchemaEditorCommandException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
}
if (parent.SchemaRoot != this)
{
throw new SchemaEditorCommandException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
}
if (nodeType == parent)
{
throw new SchemaEditorCommandException(SR.Exceptions.Schema.Msg_CircularReference);
}
if (nodeType.Parent != parent)
{
nodeType.MoveTo(parent);
}
}