当前位置: 首页>>代码示例>>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;未经允许,请勿转载。