2 writes to _nsStack
System.Private.Xml (2)
System\Xml\Core\XmlWellFormedWriter.cs (2)
262
_nsStack
= new Namespace[NamespaceStackInitialSize];
1756
_nsStack
= newStack;
36 references to _nsStack
System.Private.Xml (36)
System\Xml\Core\XmlWellFormedWriter.cs (34)
263
_nsStack
[0].Set("xmlns", XmlReservedNs.NsXmlNs, NamespaceKind.Special);
264
_nsStack
[1].Set("xml", XmlReservedNs.NsXml, NamespaceKind.Special);
267
_nsStack
[2].Set(string.Empty, string.Empty, NamespaceKind.Implied);
272
_nsStack
[2].Set(string.Empty, defaultNs ?? string.Empty, NamespaceKind.Implied);
1234
if (
_nsStack
[i].namespaceUri == ns)
1236
string prefix =
_nsStack
[i].prefix;
1239
if (
_nsStack
[i].prefix == prefix)
1599
if (
_nsStack
[existingNsIndex].namespaceUri != ns)
1601
throw new XmlException(SR.Xml_RedefinePrefix, new string[] { prefix,
_nsStack
[existingNsIndex].namespaceUri, ns });
1610
if (
_nsStack
[existingNsIndex].kind == NamespaceKind.Special)
1614
if (ns !=
_nsStack
[existingNsIndex].namespaceUri)
1632
kind = (
_nsStack
[existingNsIndex].namespaceUri == ns) ? NamespaceKind.Implied : NamespaceKind.NeedToWrite;
1679
if (
_nsStack
[existingNsIndex].namespaceUri != ns)
1681
throw new XmlException(SR.Xml_RedefinePrefix, new string?[] { prefix,
_nsStack
[existingNsIndex].namespaceUri, ns });
1684
NamespaceKind existingNsKind =
_nsStack
[existingNsIndex].kind;
1694
_nsStack
[existingNsIndex].kind = NamespaceKind.Written;
1702
if (
_nsStack
[existingNsIndex].namespaceUri == ns && _omitDuplNamespaces)
1752
if (top ==
_nsStack
.Length)
1755
Array.Copy(
_nsStack
, newStack, top);
1758
_nsStack
[top].Set(prefix, ns, kind);
1781
string prefix =
_nsStack
[namespaceIndex].prefix;
1785
_nsStack
[namespaceIndex].prevNsIndex = existingNsIndex;
1806
if (
_nsStack
[i].prefix == prefix)
1822
Debug.Assert(_nsHashtable.ContainsKey(
_nsStack
[i].prefix));
1823
if (
_nsStack
[i].prevNsIndex == -1)
1825
_nsHashtable.Remove(
_nsStack
[i].prefix);
1829
_nsHashtable[
_nsStack
[i].prefix] =
_nsStack
[i].prevNsIndex;
1965
if (
_nsStack
[i].kind == NamespaceKind.NeedToWrite)
1967
_nsStack
[i].WriteDecl(_writer, _rawWriter);
1991
if (
_nsStack
[i].prefix == prefix)
1993
return
_nsStack
[i].namespaceUri;
2003
if (
_nsStack
[i].prefix == prefix)
2005
return
_nsStack
[i].namespaceUri;
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
1383
if (
_nsStack
[i].kind == NamespaceKind.NeedToWrite)
1385
await
_nsStack
[i].WriteDeclAsync(_writer, _rawWriter).ConfigureAwait(false);