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

◆ GetNamespacesInScope()

virtual IDictionary< string, string > System.Xml.XmlNamespaceManager.GetNamespacesInScope ( XmlNamespaceScope scope)
inlinevirtualinherited

Implements System.Xml.IXmlNamespaceResolver.

Reimplemented in System.Xml.XmlTextReaderImpl.NoNamespaceManager.

Definition at line 187 of file XmlNamespaceManager.cs.

188 {
189 int i = 0;
190 switch (scope)
191 {
192 case XmlNamespaceScope.All:
193 i = 2;
194 break;
195 case XmlNamespaceScope.ExcludeXml:
196 i = 3;
197 break;
198 case XmlNamespaceScope.Local:
199 i = _lastDecl;
200 while (_nsdecls[i].scopeId == _scopeId)
201 {
202 i--;
203 }
204 i++;
205 break;
206 }
208 for (; i <= _lastDecl; i++)
209 {
210 string prefix = _nsdecls[i].prefix;
211 string uri = _nsdecls[i].uri;
212 if (uri != null)
213 {
214 if (uri.Length > 0 || prefix.Length > 0 || scope == XmlNamespaceScope.Local)
215 {
216 dictionary[prefix] = uri;
217 }
218 else
219 {
220 dictionary.Remove(prefix);
221 }
222 }
223 }
224 return dictionary;
225 }

References System.Xml.XmlNamespaceManager._lastDecl, System.Xml.XmlNamespaceManager._nsdecls, System.Xml.XmlNamespaceManager._scopeId, System.dictionary, System.prefix, System.Xml.XmlNamespaceManager.NamespaceDeclaration.prefix, and System.Xml.XmlNamespaceManager.NamespaceDeclaration.uri.

Referenced by System.Xml.DocumentSchemaValidator.GetNamespacesInScope(), System.Xml.DocumentXmlWriter.GetNamespacesInScope(), System.Xml.XmlSubtreeReader.GetNamespacesInScope(), System.Xml.XmlTextReaderImpl.GetNamespacesInScope(), System.Xml.XsdValidatingReader.GetNamespacesInScope(), and System.Xml.Schema.XsdValidator.ProcessXsiAttributes().