3 writes to _top
System.Private.Xml (3)
System\Xml\Core\XmlTextWriter.cs (3)
270
_top
= 0; // 0 is an empty sentanial element
1373
_top
--;
1790
_top
++; // Move up stack
48 references to _top
System.Private.Xml (48)
System\Xml\Core\XmlTextWriter.cs (48)
271
_stack[
_top
].Init(-1);
491
_stack[
_top
].defaultNs = _stack[
_top
- 1].defaultNs;
492
if (_stack[
_top
- 1].defaultNsState != NamespaceState.Uninitialized)
493
_stack[
_top
].defaultNsState = NamespaceState.NotDeclaredButInScope;
494
_stack[
_top
].mixed = _stack[
_top
- 1].mixed;
532
_stack[
_top
].prefix = null;
535
_stack[
_top
].prefix = prefix;
547
_stack[
_top
].name = localName;
1061
if (!string.IsNullOrEmpty(ns) && ns != _stack[
_top
].defaultNs)
1102
if (s == null && ns == _stack[
_top
].defaultNs)
1115
for (int i =
_top
; i > 0; i--)
1130
for (int i =
_top
; i > 0; i--)
1244
_stack[
_top
].mixed = true;
1270
if (s_stateTableDocument == _stateTable &&
_top
== 1)
1315
_stack[
_top
].mixed = true;
1332
while (
_top
> 0)
1344
if (
_top
<= 0)
1357
if (_namespaces && _stack[
_top
].prefix != null)
1359
_textWriter.Write(_stack[
_top
].prefix);
1362
_textWriter.Write(_stack[
_top
].name);
1367
int prevNsTop = _stack[
_top
].prevNsTop;
1387
for (int i = _nsTop; i > _stack[
_top
].prevNsTop; i--)
1400
if ((_stack[
_top
].defaultNs != _stack[
_top
- 1].defaultNs) &&
1401
(_stack[
_top
].defaultNsState == NamespaceState.DeclaredButNotWrittenOut))
1405
_xmlEncoder.Write(_stack[
_top
].defaultNs);
1407
_stack[
_top
].defaultNsState = NamespaceState.DeclaredAndWrittenOut;
1434
if (
_top
== 0)
1438
else if (!_stack[
_top
].mixed)
1441
int i = (beforeEndElement ?
_top
- 1 :
_top
) * _indentation;
1468
switch (_stack[
_top
].defaultNsState)
1478
_stack[
_top
].defaultNs = ns;
1485
_stack[
_top
].defaultNsState = (declared ? NamespaceState.DeclaredAndWrittenOut : NamespaceState.DeclaredButNotWrittenOut);
1508
if (existingNsIndex != -1 && existingNsIndex > _stack[
_top
].prevNsTop)
1584
int temp = _stack[
_top
].prefixCount++ + 1;
1585
return string.Create(CultureInfo.InvariantCulture, $"d{
_top
:d}p{temp:d}");
1637
if (nsIndex > _stack[
_top
].prevNsTop)
1645
for (int i = _nsTop; i > _stack[
_top
].prevNsTop; i--)
1747
_stack[
_top
].xmlLang = value;
1754
_stack[
_top
].xmlSpace = XmlSpace.Default;
1757
_stack[
_top
].xmlSpace = XmlSpace.Preserve;
1783
if (
_top
== _stack.Length - 1)
1786
if (
_top
> 0) Array.Copy(_stack, na,
_top
+ 1);
1791
_stack[
_top
].Init(_nsTop);