3 writes to _top
System.Private.Xml (3)
System\Xml\Core\XmlTextWriter.cs (3)
269
_top
= 0; // 0 is an empty sentanial element
1372
_top
--;
1789
_top
++; // Move up stack
48 references to _top
System.Private.Xml (48)
System\Xml\Core\XmlTextWriter.cs (48)
270
_stack[
_top
].Init(-1);
490
_stack[
_top
].defaultNs = _stack[
_top
- 1].defaultNs;
491
if (_stack[
_top
- 1].defaultNsState != NamespaceState.Uninitialized)
492
_stack[
_top
].defaultNsState = NamespaceState.NotDeclaredButInScope;
493
_stack[
_top
].mixed = _stack[
_top
- 1].mixed;
531
_stack[
_top
].prefix = null;
534
_stack[
_top
].prefix = prefix;
546
_stack[
_top
].name = localName;
1060
if (!string.IsNullOrEmpty(ns) && ns != _stack[
_top
].defaultNs)
1101
if (s == null && ns == _stack[
_top
].defaultNs)
1114
for (int i =
_top
; i > 0; i--)
1129
for (int i =
_top
; i > 0; i--)
1243
_stack[
_top
].mixed = true;
1269
if (s_stateTableDocument == _stateTable &&
_top
== 1)
1314
_stack[
_top
].mixed = true;
1331
while (
_top
> 0)
1343
if (
_top
<= 0)
1356
if (_namespaces && _stack[
_top
].prefix != null)
1358
_textWriter.Write(_stack[
_top
].prefix);
1361
_textWriter.Write(_stack[
_top
].name);
1366
int prevNsTop = _stack[
_top
].prevNsTop;
1386
for (int i = _nsTop; i > _stack[
_top
].prevNsTop; i--)
1399
if ((_stack[
_top
].defaultNs != _stack[
_top
- 1].defaultNs) &&
1400
(_stack[
_top
].defaultNsState == NamespaceState.DeclaredButNotWrittenOut))
1404
_xmlEncoder.Write(_stack[
_top
].defaultNs);
1406
_stack[
_top
].defaultNsState = NamespaceState.DeclaredAndWrittenOut;
1433
if (
_top
== 0)
1437
else if (!_stack[
_top
].mixed)
1440
int i = (beforeEndElement ?
_top
- 1 :
_top
) * _indentation;
1467
switch (_stack[
_top
].defaultNsState)
1477
_stack[
_top
].defaultNs = ns;
1484
_stack[
_top
].defaultNsState = (declared ? NamespaceState.DeclaredAndWrittenOut : NamespaceState.DeclaredButNotWrittenOut);
1507
if (existingNsIndex != -1 && existingNsIndex > _stack[
_top
].prevNsTop)
1583
int temp = _stack[
_top
].prefixCount++ + 1;
1584
return string.Create(CultureInfo.InvariantCulture, $"d{
_top
:d}p{temp:d}");
1636
if (nsIndex > _stack[
_top
].prevNsTop)
1644
for (int i = _nsTop; i > _stack[
_top
].prevNsTop; i--)
1746
_stack[
_top
].xmlLang = value;
1753
_stack[
_top
].xmlSpace = XmlSpace.Default;
1756
_stack[
_top
].xmlSpace = XmlSpace.Preserve;
1782
if (
_top
== _stack.Length - 1)
1785
if (
_top
> 0) Array.Copy(_stack, na,
_top
+ 1);
1790
_stack[
_top
].Init(_nsTop);