當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlDocument.GetInsertEventArgsForLoad方法代碼示例

本文整理匯總了C#中System.Xml.XmlDocument.GetInsertEventArgsForLoad方法的典型用法代碼示例。如果您正苦於以下問題:C# XmlDocument.GetInsertEventArgsForLoad方法的具體用法?C# XmlDocument.GetInsertEventArgsForLoad怎麽用?C# XmlDocument.GetInsertEventArgsForLoad使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Xml.XmlDocument的用法示例。


在下文中一共展示了XmlDocument.GetInsertEventArgsForLoad方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AppendChildForLoad

 internal override XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc)
 {
     XmlNodeChangedEventArgs insertEventArgsForLoad = doc.GetInsertEventArgsForLoad(newChild, this);
     if (insertEventArgsForLoad != null)
     {
         doc.BeforeEvent(insertEventArgsForLoad);
     }
     XmlLinkedNode nextNode = (XmlLinkedNode) newChild;
     if ((this.lastChild == null) || (this.lastChild == this))
     {
         nextNode.next = nextNode;
         this.lastChild = nextNode;
         nextNode.SetParentForLoad(this);
     }
     else
     {
         XmlLinkedNode lastChild = this.lastChild;
         nextNode.next = lastChild.next;
         lastChild.next = nextNode;
         this.lastChild = nextNode;
         if (lastChild.IsText && nextNode.IsText)
         {
             XmlNode.NestTextNodes(lastChild, nextNode);
         }
         else
         {
             nextNode.SetParentForLoad(this);
         }
     }
     if (insertEventArgsForLoad != null)
     {
         doc.AfterEvent(insertEventArgsForLoad);
     }
     return nextNode;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:35,代碼來源:XmlElement.cs

示例2: AddNodeForLoad

 internal virtual XmlNode AddNodeForLoad(XmlNode node, XmlDocument doc)
 {
     XmlNodeChangedEventArgs insertEventArgsForLoad = doc.GetInsertEventArgsForLoad(node, this.parent);
     if (insertEventArgsForLoad != null)
     {
         doc.BeforeEvent(insertEventArgsForLoad);
     }
     this.Nodes.Add(node);
     node.SetParent(this.parent);
     if (insertEventArgsForLoad != null)
     {
         doc.AfterEvent(insertEventArgsForLoad);
     }
     return node;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:15,代碼來源:XmlNamedNodeMap.cs

示例3: AppendChildForLoad

        //the function is provided only at Load time to speed up Load process
        internal override XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc) {
            XmlNodeChangedEventArgs args = doc.GetInsertEventArgsForLoad( newChild, this );

            if (args != null)
                doc.BeforeEvent( args );

            XmlLinkedNode newNode = (XmlLinkedNode)newChild;

            if (lastChild == null) { // if LastNode == null
                newNode.next = newNode;
                lastChild = newNode;
                newNode.SetParentForLoad(this);
            }
            else {
                XmlLinkedNode refNode = lastChild; // refNode = LastNode;
                newNode.next = refNode.next;
                refNode.next = newNode;
                lastChild = newNode; // LastNode = newNode;
                if (refNode.IsText
                    && newNode.IsText) {
                    NestTextNodes(refNode, newNode);
                }
                else {
                    newNode.SetParentForLoad(this);
                }
            }

            if (args != null)
                doc.AfterEvent( args );

            return newNode;
        }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:33,代碼來源:XmlAttribute.cs

示例4: AddNodeForLoad

 internal virtual XmlNode AddNodeForLoad(XmlNode node, XmlDocument doc) {
     XmlNodeChangedEventArgs args = doc.GetInsertEventArgsForLoad(node, parent);
     if (args != null) {
         doc.BeforeEvent(args);
     }
     nodes.Add(node);
     node.SetParent(parent);
     if (args != null) {
         doc.AfterEvent(args);
     }
     return node;
 }
開發者ID:uQr,項目名稱:referencesource,代碼行數:12,代碼來源:XmlNamedNodemap.cs

示例5: AppendChildForLoad

        //the function is provided only at Load time to speed up Load process
        internal virtual XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc) {
            XmlNodeChangedEventArgs args = doc.GetInsertEventArgsForLoad( newChild, this );

            if (args != null)
                doc.BeforeEvent( args );

            XmlLinkedNode newNode = (XmlLinkedNode) newChild;

            if (LastNode == null) {
                newNode.next = newNode;
            }
            else {
                newNode.next = LastNode.next;
                LastNode.next = newNode;
            }

            LastNode = newNode;
            newNode.SetParentForLoad( this );

            if (args != null)
                doc.AfterEvent( args );

            return newNode;
        }
開發者ID:ArildF,項目名稱:masters,代碼行數:25,代碼來源:xmlnode.cs

示例6: AppendChildForLoad

        internal override XmlNode AppendChildForLoad( XmlNode newChild, XmlDocument doc ) {
            XmlNodeChangedEventArgs args = doc.GetInsertEventArgsForLoad( newChild, this );

            if (args != null)
                doc.BeforeEvent( args );

            XmlLinkedNode newNode = (XmlLinkedNode) newChild;

            if (lastChild == null || lastChild == emptyElem) {
                newNode.next = newNode;
            }
            else {
                newNode.next = lastChild.next;
                lastChild.next = newNode;
            }

            lastChild = newNode;
            newNode.SetParentForLoad( this );

            if (args != null)
                doc.AfterEvent( args );

            return newNode;
        }
開發者ID:ArildF,項目名稱:masters,代碼行數:24,代碼來源:xmlelement.cs


注:本文中的System.Xml.XmlDocument.GetInsertEventArgsForLoad方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。