コード例 #1
0
 internal void AddNodeSkipNotify(XNode n)
 {
     this.ValidateNode(n, this);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode parent = this;
         while (parent.parent != null)
         {
             parent = parent.parent;
         }
         if (n == parent)
         {
             n = n.CloneNode();
         }
     }
     this.ConvertTextToNode();
     this.AppendNodeSkipNotify(n);
 }
コード例 #2
0
ファイル: XContainer.cs プロジェクト: must/dotnet-corefx
 internal void AddNodeSkipNotify(XNode n)
 {
     ValidateNode(n, this);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = this;
         while (p.parent != null)
         {
             p = p.parent;
         }
         if (n == p)
         {
             n = n.CloneNode();
         }
     }
     ConvertTextToNode();
     AppendNodeSkipNotify(n);
 }
コード例 #3
0
 private void AddNode(XNode n)
 {
     this.parent.ValidateNode(n, this.previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode parent = this.parent;
         while (parent.parent != null)
         {
             parent = parent.parent;
         }
         if (n == parent)
         {
             n = n.CloneNode();
         }
     }
     this.parent.ConvertTextToNode();
     if (this.text != null)
     {
         if (this.text.Length > 0)
         {
             if ((this.previous is XText) && !(this.previous is XCData))
             {
                 XText previous = (XText)this.previous;
                 previous.Value = previous.Value + this.text;
             }
             else
             {
                 this.InsertNode(new XText(this.text));
             }
         }
         this.text = null;
     }
     this.InsertNode(n);
 }
コード例 #4
0
 private void AddNode(XNode n)
 {
     _parent.ValidateNode(n, _previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = _parent;
         while (p.parent != null)
         {
             p = p.parent;
         }
         if (n == p)
         {
             n = n.CloneNode();
         }
     }
     _parent.ConvertTextToNode();
     if (_text != null)
     {
         if (_text.Length > 0)
         {
             XText prevXText = _previous as XText;
             if (prevXText != null && !(_previous is XCData))
             {
                 prevXText.Value += _text;
             }
             else
             {
                 InsertNode(new XText(_text));
             }
         }
         _text = null;
     }
     InsertNode(n);
 }
コード例 #5
0
 void AddNode(XNode n)
 {
     parent.ValidateNode(n, previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = parent;
         while (p.parent != null)
         {
             p = p.parent;
         }
         if (n == p)
         {
             n = n.CloneNode();
         }
     }
     parent.ConvertTextToNode();
     if (text != null)
     {
         if (text.Length > 0)
         {
             if (previous is XText && !(previous is XCData))
             {
                 ((XText)previous).Value += text;
             }
             else
             {
                 InsertNode(new XText(text));
             }
         }
         text = null;
     }
     InsertNode(n);
 }
コード例 #6
0
ファイル: XContainer.cs プロジェクト: viniciussalmeida/corefx
 internal XContainer(XContainer other)
 {
     if (other == null) throw new ArgumentNullException("other");
     if (other.content is string)
     {
         this.content = other.content;
     }
     else
     {
         XNode n = (XNode)other.content;
         if (n != null)
         {
             do
             {
                 n = n.next;
                 AppendNodeSkipNotify(n.CloneNode());
             } while (n != other.content);
         }
     }
 }
コード例 #7
0
ファイル: XLinq.cs プロジェクト: SamuelEnglard/corefx
 private void AddNode(XNode n)
 {
     _parent.ValidateNode(n, _previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = _parent;
         while (p.parent != null) p = p.parent;
         if (n == p) n = n.CloneNode();
     }
     _parent.ConvertTextToNode();
     if (_text != null)
     {
         if (_text.Length > 0)
         {
             XText prevXText = _previous as XText;
             if (prevXText != null && !(_previous is XCData))
             {
                 prevXText.Value += _text;
             }
             else
             {
                 InsertNode(new XText(_text));
             }
         }
         _text = null;
     }
     InsertNode(n);
 }
コード例 #8
0
ファイル: XContainer.cs プロジェクト: er0dr1guez/corefx
 internal void AddNodeSkipNotify(XNode n)
 {
     ValidateNode(n, this);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = this;
         while (p.parent != null) p = p.parent;
         if (n == p) n = n.CloneNode();
     }
     ConvertTextToNode();
     AppendNodeSkipNotify(n);
 }
コード例 #9
0
 void AddNode(XNode n)
 {
     parent.ValidateNode(n, previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode p = parent;
         while (p.parent != null) p = p.parent;
         if (n == p) n = n.CloneNode();
     }
     parent.ConvertTextToNode();
     if (text != null)
     {
         if (text.Length > 0)
         {
             if (previous is XText && !(previous is XCData))
             {
                 ((XText)previous).Value += text;
             }
             else
             {
                 InsertNode(new XText(text));
             }
         }
         text = null;
     }
     InsertNode(n);
 }
コード例 #10
0
 private void AddNode(XNode n)
 {
     this.parent.ValidateNode(n, this.previous);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode parent = this.parent;
         while (parent.parent != null)
         {
             parent = parent.parent;
         }
         if (n == parent)
         {
             n = n.CloneNode();
         }
     }
     this.parent.ConvertTextToNode();
     if (this.text != null)
     {
         if (this.text.Length > 0)
         {
             if ((this.previous is XText) && !(this.previous is XCData))
             {
                 XText previous = (XText) this.previous;
                 previous.Value = previous.Value + this.text;
             }
             else
             {
                 this.InsertNode(new XText(this.text));
             }
         }
         this.text = null;
     }
     this.InsertNode(n);
 }
コード例 #11
0
 internal void AddNodeSkipNotify(XNode n)
 {
     this.ValidateNode(n, this);
     if (n.parent != null)
     {
         n = n.CloneNode();
     }
     else
     {
         XNode parent = this;
         while (parent.parent != null)
         {
             parent = parent.parent;
         }
         if (n == parent)
         {
             n = n.CloneNode();
         }
     }
     this.ConvertTextToNode();
     this.AppendNodeSkipNotify(n);
 }