11 writes to parent
System.Private.Xml.Linq (11)
System\Xml\Linq\XContainer.cs (6)
76t.parent = this; 414n.parent = null; 623n.parent = this; 738t.parent = this; 1259n.parent = null; 1272n.parent = null;
System\Xml\Linq\XElement.cs (4)
950a.parent = null; 1923a.parent = this; 2097a.parent = null; 2110a.parent = null;
System\Xml\Linq\XLinq.cs (1)
158n.parent = _parent;
152 references to parent
System.Private.Xml.Linq (152)
System\Xml\Linq\Extensions.cs (9)
143} while (n.parent == root && n != root.content); 354} while (a.parent == e && a != e.lastAttr); 366XElement? e = (self ? node : node.parent) as XElement; 370e = e.parent as XElement; 394while (n != null && n != root && n == n.parent!.content) n = n.parent; 425while (n != null && n != root && n == n.parent!.content) n = n.parent; 451} while (n.parent == root && n != root.content);
System\Xml\Linq\XAttribute.cs (9)
114get { return parent != null && ((XElement)parent).lastAttr != this ? next : null; } 142if (parent == null) return null; 143XAttribute a = ((XElement)parent).lastAttr!; 148return a != ((XElement)parent).lastAttr ? a : null; 182if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 183((XElement)parent).RemoveAttribute(this); 694if (parent != null) return ((XElement)parent).GetPrefixOfNamespace(ns);
System\Xml\Linq\XContainer.cs (20)
358} while (n.parent == this && n != content); 512if (n.parent != null) 519while (p.parent != null) p = p.parent; 529if (n.parent != null) 536while (p.parent != null) p = p.parent; 616if (n.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 758while (n != null && n != this && n == n.parent!.content) n = n.parent; 783while (n != this && n == n.parent!.content) n = n.parent; 803} while (n.parent == this && n != content); 924_currentContainer = _currentContainer.parent!; 980_currentContainer = _currentContainer.parent!; 1067_baseUri = _currentContainer.parent!.BaseUri; 1069_currentContainer = _currentContainer.parent!; 1183_baseUri = _currentContainer.parent!.BaseUri; 1185_currentContainer = _currentContainer.parent!; 1245if (n.parent != this) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XElement.cs (8)
528e = e.parent as XElement; 1882if (parent != null || annotations != null || content != null || lastAttr != null) throw new InvalidOperationException(SR.InvalidOperation_DeserializeInstance); 1902if (a.parent != null) a = new XAttribute(a); 1909if (a.parent != null) a = new XAttribute(a); 1916if (a.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 1973} while (a.parent == this && a != lastAttr); 1993e = e.parent as XElement; 2085if (a.parent != this) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XLinq.cs (9)
117if (n.parent != null) 124while (p.parent != null) p = p.parent; 157if (n.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 240while (n != root && n == n.parent!.content) 242n = n.parent; 285while (n != root && n == n.parent!.content) 287n = n.parent; 310e = e!.parent as XElement;
System\Xml\Linq\XNode.cs (49)
49return parent == null || this == parent.content ? null : next; 64if (parent == null) return null; 65Debug.Assert(parent.content != null); 66XNode n = ((XNode)parent.content!).next!; 109if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 110new Inserter(parent, this).Add(content); 153if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 154XNode? p = (XNode)parent.content!; 156if (p == parent.content) p = null; 157new Inserter(parent, p).Add(content); 229if (n1.parent != n2.parent) 233while (p1.parent != null) 235p1 = p1.parent; 239while (p2.parent != null) 241p2 = p2.parent; 249n2 = n2.parent!; 258n1 = n1.parent!; 263while (n1.parent != n2.parent) 265n1 = n1.parent!; 266n2 = n2.parent!; 269else if (n1.parent == null) 273XNode n = (XNode)n1.parent!.content!; 313while (n.parent != null && n != n.parent.content) 329if (parent != null) 331XNode n = (XNode)parent.content!; 337} while (parent != null && parent == n.parent); 526if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 527parent.RemoveNode(this); 542if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 543XContainer c = parent; 544XNode? p = (XNode)parent.content!; 546if (p == parent.content) p = null; 547parent.RemoveNode(this); 548if (p != null && p.parent != c) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 632XElement? e = (self ? this : parent) as XElement; 636e = e.parent as XElement; 643while (n.parent != null && n != n.parent.content) 653if (parent != null) 655XNode n = (XNode)parent.content!; 662} while (parent != null && parent == n.parent);
System\Xml\Linq\XNodeBuilder.cs (2)
110_parent = ((XElement)_parent!).parent; 144_parent = e.parent;
System\Xml\Linq\XNodeReader.cs (30)
108while (o.parent != null) 111o = o.parent; 294if (o.parent != null && o.parent.parent == null && o.parent is XDocument) 407e = e.parent as XElement; 441e = e.parent as XElement; 736if (a.parent != null) 738_source = a.parent; 818if (a.parent != null && ((XElement)a.parent).lastAttr != a) 943if (n.parent is XElement) 945_source = n.parent; 1094return (XElement?)a.parent; 1099return (XElement?)a.parent; 1114return n.parent as XElement; 1119return (XElement?)a.parent; 1129return (XElement?)a.parent; 1240XElement? e = (XElement?)a.parent; 1259if (null == next || next == n || n == n.parent!.content) 1261if (n.parent == null || (n.parent.parent == null && n.parent is XDocument)) 1265_source = n.parent; 1333XElement? element = candidateAttribute.parent as XElement; 1339element = element.parent as XElement; 1374element = element.parent as XElement; 1392XElement? e = candidate.parent as XElement;
System\Xml\Linq\XObject.cs (13)
33o = o.parent; 38o = o.parent; 52while (n.parent != null) n = n.parent; 73get { return parent as XElement; } 426o = o.parent; 435o = o.parent; 448o = o.parent; 457o = o.parent; 479o = o.parent; 483o = o.parent; 499o = o.parent; 510o = o.parent;
System\Xml\Linq\XText.cs (2)
87if (parent is XDocument) 113return parent is XDocument ?
System\Xml\Schema\XNodeValidator.cs (1)
195e = e.parent as XElement;