internal override XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc)
{
Debug.Assert(doc == this);
if (!IsValidChildType(newChild.NodeType))
throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict);
if (!CanInsertAfter(newChild, LastChild))
throw new InvalidOperationException(SR.Xdom_Node_Insert_Location);
XmlNodeChangedEventArgs args = GetInsertEventArgsForLoad(newChild, this);
if (args != null)
BeforeEvent(args);
XmlLinkedNode newNode = (XmlLinkedNode)newChild;
if (_lastChild == null)
{
newNode.next = newNode;
}
else
{
newNode.next = _lastChild.next;
_lastChild.next = newNode;
}
_lastChild = newNode;
newNode.SetParentForLoad(this);
if (args != null)
AfterEvent(args);
return newNode;
}