Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetNamespacesInScope()

IDictionary< string, string > IXmlNamespaceResolver. System.Xml.XmlSqlBinaryReader.GetNamespacesInScope ( XmlNamespaceScope scope)
inlineprivate

Implements System.Xml.IXmlNamespaceResolver.

Definition at line 1661 of file XmlSqlBinaryReader.cs.

1662 {
1663 if (ScanState.XmlText == _state)
1664 {
1665 IXmlNamespaceResolver xmlNamespaceResolver = (IXmlNamespaceResolver)_textXmlReader;
1666 return xmlNamespaceResolver.GetNamespacesInScope(scope);
1667 }
1669 if (XmlNamespaceScope.Local == scope)
1670 {
1671 if (_elemDepth > 0)
1672 {
1673 for (NamespaceDecl namespaceDecl = _elementStack[_elemDepth].nsdecls; namespaceDecl != null; namespaceDecl = namespaceDecl.scopeLink)
1674 {
1675 dictionary.Add(namespaceDecl.prefix, namespaceDecl.uri);
1676 }
1677 }
1678 }
1679 else
1680 {
1681 foreach (NamespaceDecl value in _namespaces.Values)
1682 {
1683 if ((value.scope != -1 || (scope == XmlNamespaceScope.All && "xml" == value.prefix)) && (value.prefix.Length > 0 || value.uri.Length > 0))
1684 {
1685 dictionary.Add(value.prefix, value.uri);
1686 }
1687 }
1688 }
1689 return dictionary;
1690 }
readonly Dictionary< string, NamespaceDecl > _namespaces

References System.Xml.XmlSqlBinaryReader._elemDepth, System.Xml.XmlSqlBinaryReader._elementStack, System.Xml.XmlSqlBinaryReader._namespaces, System.Xml.XmlSqlBinaryReader._state, System.Xml.XmlSqlBinaryReader._textXmlReader, System.dictionary, System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.