Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InsertNode()

void System.Xml.Linq.Inserter.InsertNode ( XNode n)
inlineprivate

Definition at line 155 of file Inserter.cs.

156 {
157 bool flag = _parent.NotifyChanging(n, XObjectChangeEventArgs.Add);
158 if (n.parent != null)
159 {
161 }
163 if (_parent.content == null || _parent.content is string)
164 {
165 n.next = n;
167 }
168 else if (_previous == null)
169 {
170 XNode xNode = (XNode)_parent.content;
171 n.next = xNode.next;
172 xNode.next = n;
173 }
174 else
175 {
179 {
181 }
182 }
183 _previous = n;
184 if (flag)
185 {
186 _parent.NotifyChanged(n, XObjectChangeEventArgs.Add);
187 }
188 }
static string InvalidOperation_ExternalCode
Definition SR.cs:50
Definition SR.cs:7
bool NotifyChanging(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:428
bool NotifyChanged(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:399
readonly XContainer _parent
Definition Inserter.cs:7

References System.Xml.Linq.Inserter._parent, System.Xml.Linq.Inserter._previous, System.Xml.Linq.XObjectChangeEventArgs.Add, System.Xml.Linq.XContainer.content, System.Xml.Dictionary, System.SR.InvalidOperation_ExternalCode, System.Xml.Linq.XNode.next, System.Xml.Linq.XObject.NotifyChanged(), and System.Xml.Linq.XObject.NotifyChanging().

Referenced by System.Xml.Linq.Inserter.Add(), and System.Xml.Linq.Inserter.AddNode().