MoveTo() private method

private MoveTo ( NodeType parent ) : void
parent NodeType
return void
Example #1
0
 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);
     }
 }
Example #2
0
		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);
		}