11 writes to parent
System.Xml.Linq (11)
System\Xml\Linq\XLinq.cs (11)
2360t.parent = this; 2664n.parent = null; 2837n.parent = this; 2931t.parent = this; 3209n.parent = null; 3219n.parent = null; 3390n.parent = parent; 4120a.parent = null; 4993a.parent = this; 5111a.parent = null; 5121a.parent = null;
183 references to parent
System.Xml.Linq (183)
System\Xml\Linq\XComponentModel.cs (8)
133if (a != null && value.element == a.parent && value.name == a.Name) { 152changeState = a != null && value.element == a.parent && value.name == a.Name ? a : null; 218if (e != null && value.element == e.parent && value.name == e.Name && value.element.Element(value.name) == e) { 232if (value.element == e.parent && value.name == e.Name && value.element.Element(value.name) == e) { 250changeState = e != null && value.element == e.parent && value.name == e.Name && value.element.Element(value.name) == e ? e : null; 273if (e != null && value.element == e.parent && (value.name == e.Name || value.name == null)) { 286if (e != null && value.element == e.parent && value.name != null && (value.name == e.Name || value.name == (changeState as XName))) { 299changeState = e != null ? e.parent : null;
System\Xml\Linq\XLinq.cs (145)
942o = o.parent; 947o = o.parent; 959while (n.parent != null) n = n.parent; 976get { return parent as XElement; } 1243o = o.parent; 1253o = o.parent; 1263o = o.parent; 1273o = o.parent; 1290o = o.parent; 1294o = o.parent; 1307o = o.parent; 1316o = o.parent; 1475return parent == null || this == parent.content ? null : next; 1488if (parent == null) return null; 1489XNode n = ((XNode)parent.content).next; 1540if (parent == null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_MissingParent)); 1541new Inserter(parent, this).Add(content); 1582if (parent == null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_MissingParent)); 1583XNode p = (XNode)parent.content; 1585if (p == parent.content) p = null; 1586new Inserter(parent, p).Add(content); 1655if (n1.parent != n2.parent) { 1658while (p1.parent != null) { 1659p1 = p1.parent; 1663while (p2.parent != null) { 1664p2 = p2.parent; 1670n2 = n2.parent; 1677n1 = n1.parent; 1682while (n1.parent != n2.parent) { 1683n1 = n1.parent; 1684n2 = n2.parent; 1687else if (n1.parent == null) { 1690XNode n = (XNode)n1.parent.content; 1726while (n.parent != null && n != n.parent.content) { 1740if (parent != null) { 1741XNode n = (XNode)parent.content; 1746} while (parent != null && parent == n.parent); 1859if (parent == null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_MissingParent)); 1860parent.RemoveNode(this); 1874if (parent == null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_MissingParent)); 1875XContainer c = parent; 1876XNode p = (XNode)parent.content; 1878if (p == parent.content) p = null; 1879parent.RemoveNode(this); 1880if (p != null && p.parent != c) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 1952XElement e = (self ? this : parent) as XElement; 1955e = e.parent as XElement; 1961while (n.parent != null && n != n.parent.content) { 1969if (parent != null) { 1970XNode n = (XNode)parent.content; 1976} while (parent != null && parent == n.parent); 2237if (parent is XDocument) { 2619} while (n.parent == this && n != content); 2750if (n.parent != null) { 2755while (p.parent != null) p = p.parent; 2764if (n.parent != null) { 2769while (p.parent != null) p = p.parent; 2831if (n.parent != null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 2951while (n != null && n != this && n == n.parent.content) n = n.parent; 2971while (n != this && n == n.parent.content) n = n.parent; 2988} while (n.parent == this && n != content); 3053c = c.parent; 3143baseUri = c.parent.BaseUri; 3145c = c.parent; 3199if (n.parent != this) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 3358if (n.parent != null) { 3363while (p.parent != null) p = p.parent; 3389if (n.parent != null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 3823e = e.parent as XElement; 4957if (parent != null || annotations != null || content != null || lastAttr != null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_DeserializeInstance)); 4975if (a.parent != null) a = new XAttribute(a); 4981if (a.parent != null) a = new XAttribute(a); 4987if (a.parent != null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 5033} while (a.parent == this && a != lastAttr); 5048e = e.parent as XElement; 5101if (a.parent != this) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_ExternalCode)); 5175while (n != root && n == n.parent.content) { 5176n = n.parent; 5197e = e.parent as XElement; 6621get { return parent != null && ((XElement)parent).lastAttr != this ? next : null; } 6645if (parent == null) return null; 6646XAttribute a = ((XElement)parent).lastAttr; 6650return a != ((XElement)parent).lastAttr ? a : null; 6680if (parent == null) throw new InvalidOperationException(Res.GetString(Res.InvalidOperation_MissingParent)); 6681((XElement)parent).RemoveAttribute(this); 7135if (parent != null) return ((XElement)parent).GetPrefixOfNamespace(ns); 7621} while (n.parent == root && n != root.content); 7785} while (a.parent == e && a != e.lastAttr); 7794XElement e = (self ? node : node.parent) as XElement; 7797e = e.parent as XElement; 7815while (n != null && n != root && n == n.parent.content) n = n.parent; 7839while (n != null && n != root && n == n.parent.content) n = n.parent; 7860} while (n.parent == root && n != root.content); 7942parent = ((XElement)parent).parent; 7972parent = e.parent; 8145while (o.parent != null) { 8147o = o.parent; 8290if (o.parent != null && o.parent.parent == null && o.parent is XDocument) { 8380e = e.parent as XElement; 8407e = e.parent as XElement; 8630if (a.parent != null) { 8631source = a.parent; 8694if (a.parent != null && ((XElement)a.parent).lastAttr != a) { 8793if (n.parent is XElement) { 8794source = n.parent; 8843n = n.parent; 8946return (XElement)a.parent; 8950return (XElement)a.parent; 8962return n.parent as XElement; 8966return (XElement)a.parent; 8974return (XElement)a.parent; 9064XElement e = (XElement)a.parent; 9079if (null == next || next == n || n == n.parent.content) { 9080if (n.parent == null || (n.parent.parent == null && n.parent is XDocument)) { 9083source = n.parent; 9140XElement element = candidateAttribute.parent as XElement; 9145element = element.parent as XElement; 9173element = element.parent as XElement; 9190XElement e = candidate.parent as XElement;
System\Xml\Linq\XNodeNavigator.cs (29)
104if (s.Length != 0 && (c.parent != null || c is XElement)) { 336if ((TextMask & mask) != 0 && c.parent == null && c is XDocument) { 351if ((TextMask & mask) != 0 && c.parent == null && c is XDocument) { 396if (s.Length != 0 && (c.parent != null || c is XElement)) { 469XContainer c = n.parent; 487XContainer c = n.parent; 507XContainer c = n.parent; 510if ((TextMask & mask) != 0 && c.parent == null && c is XDocument) { 529XElement e = (XElement)a.parent; 548if (a.parent != parent) { 586if (o.parent != null) { 587source = o.parent; 596XContainer c = n.parent; 653if (n.parent != null) { 654while (n != n.parent.content) { 672if (c.parent != null || c is XElement) { 686return (object)t1.Value == (object)n2.source && t1.parent == n2.parent; 690return (object)t2.Value == (object)n1.source && t2.parent == n1.parent; 710e = e.parent as XElement; 729XElement e = (XElement)a.parent; 737e = e.parent as XElement; 745XElement e = (XElement)a.parent; 767while (e != null && e != a.parent) { 771e = e.parent as XElement; 795if (t != null && t.parent != null) { 796while (t != t.parent.content) { 832if (text.parent is XDocument) throw new ArgumentException(System.Xml.Linq.Res.GetString(System.Xml.Linq.Res.Argument_CreateNavigator, XmlNodeType.Whitespace)); 909if (n.parent == null) { 912XNode p = (XNode)n.parent.content;
System\Xml\Linq\XNodeValidator.cs (1)
161e = e.parent as XElement;