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