2 writes to nsStack
System.Xml (2)
System\Xml\Core\XmlWellFormedWriter.cs (2)
271
nsStack
= new Namespace[NamespaceStackInitialSize];
1527
nsStack
= newStack;
36 references to nsStack
System.Xml (36)
System\Xml\Core\XmlWellFormedWriter.cs (34)
272
nsStack
[0].Set("xmlns", XmlReservedNs.NsXmlNs, NamespaceKind.Special);
273
nsStack
[1].Set("xml", XmlReservedNs.NsXml, NamespaceKind.Special);
275
nsStack
[2].Set(string.Empty, string.Empty, NamespaceKind.Implied);
279
nsStack
[2].Set(string.Empty, (defaultNs == null ? string.Empty : defaultNs), NamespaceKind.Implied);
1096
if (
nsStack
[i].namespaceUri == ns) {
1097
string prefix =
nsStack
[i].prefix;
1099
if (
nsStack
[i].prefix == prefix) {
1400
if (
nsStack
[existingNsIndex].namespaceUri != ns) {
1401
throw new XmlException(Res.Xml_RedefinePrefix, new string[] { prefix,
nsStack
[existingNsIndex].namespaceUri, ns });
1409
if (
nsStack
[existingNsIndex].kind == NamespaceKind.Special) {
1411
if (ns !=
nsStack
[existingNsIndex].namespaceUri) {
1425
kind = (
nsStack
[existingNsIndex].namespaceUri == ns) ? NamespaceKind.Implied : NamespaceKind.NeedToWrite;
1465
if (
nsStack
[existingNsIndex].namespaceUri != ns) {
1466
throw new XmlException(Res.Xml_RedefinePrefix, new string[] { prefix,
nsStack
[existingNsIndex].namespaceUri, ns });
1469
NamespaceKind existingNsKind =
nsStack
[existingNsIndex].kind;
1477
nsStack
[existingNsIndex].kind = NamespaceKind.Written;
1484
if (
nsStack
[existingNsIndex].namespaceUri == ns && omitDuplNamespaces) {
1524
if (top ==
nsStack
.Length) {
1526
Array.Copy(
nsStack
, newStack, top);
1529
nsStack
[top].Set(prefix, ns, kind);
1546
string prefix =
nsStack
[namespaceIndex].prefix;
1549
nsStack
[namespaceIndex].prevNsIndex = existingNsIndex;
1563
if (
nsStack
[i].prefix == prefix) {
1575
Debug.Assert(nsHashtable.ContainsKey(
nsStack
[i].prefix));
1576
if (
nsStack
[i].prevNsIndex == -1) {
1577
nsHashtable.Remove(
nsStack
[i].prefix);
1580
nsHashtable[
nsStack
[i].prefix] =
nsStack
[i].prevNsIndex;
1718
if (
nsStack
[i].kind == NamespaceKind.NeedToWrite) {
1719
nsStack
[i].WriteDecl(writer, rawWriter);
1740
if (
nsStack
[i].prefix == prefix) {
1741
return
nsStack
[i].namespaceUri;
1749
if (
nsStack
[i].prefix == prefix) {
1750
return
nsStack
[i].namespaceUri;
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
1162
if (
nsStack
[i].kind == NamespaceKind.NeedToWrite) {
1163
await
nsStack
[i].WriteDeclAsync(writer, rawWriter).ConfigureAwait(false);