GetEventArgs() 개인적인 메소드

private GetEventArgs ( XmlNode node, XmlNode oldParent, XmlNode newParent, string oldValue, string newValue, XmlNodeChangedAction action ) : XmlNodeChangedEventArgs
node XmlNode
oldParent XmlNode
newParent XmlNode
oldValue string
newValue string
action XmlNodeChangedAction
리턴 XmlNodeChangedEventArgs
        internal virtual XmlNodeChangedEventArgs GetEventArgs(XmlNode node, XmlNode oldParent, XmlNode newParent, string oldValue, string newValue, XmlNodeChangedAction action)
        {
            XmlDocument ownerDocument = this.OwnerDocument;

            if (ownerDocument == null)
            {
                return(null);
            }
            if (!ownerDocument.IsLoading && (((newParent != null) && newParent.IsReadOnly) || ((oldParent != null) && oldParent.IsReadOnly)))
            {
                throw new InvalidOperationException(Res.GetString("Xdom_Node_Modify_ReadOnly"));
            }
            return(ownerDocument.GetEventArgs(node, oldParent, newParent, oldValue, newValue, action));
        }
예제 #2
0
        internal virtual XmlNodeChangedEventArgs GetEventArgs(XmlNode node, XmlNode oldParent, XmlNode newParent, string oldValue, string newValue, XmlNodeChangedAction action)
        {
            XmlDocument doc = OwnerDocument;

            if (doc != null)
            {
                if (!doc.IsLoading)
                {
                    if (((newParent != null && newParent.IsReadOnly) || (oldParent != null && oldParent.IsReadOnly)))
                    {
                        throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly);
                    }
                }
                return(doc.GetEventArgs(node, oldParent, newParent, oldValue, newValue, action));
            }
            return(null);
        }