MoveTo() приватный Метод

private MoveTo ( NodeType parent ) : void
parent NodeType
Результат void
Пример #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);
     }
 }
Пример #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);
		}