Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SchemaNamespaceManager.cs
Go to the documentation of this file.
1
namespace
System.Xml.Schema
;
2
3
internal
sealed
class
SchemaNamespaceManager
:
XmlNamespaceManager
4
{
5
private
readonly
XmlSchemaObject
_node
;
6
7
public
SchemaNamespaceManager
(
XmlSchemaObject
node
)
8
{
9
_node
=
node
;
10
}
11
12
public
override
string
LookupNamespace
(
string
prefix
)
13
{
14
if
(
prefix
==
"xml"
)
15
{
16
return
"http://www.w3.org/XML/1998/namespace"
;
17
}
18
for
(
XmlSchemaObject
xmlSchemaObject
=
_node
;
xmlSchemaObject
!=
null
;
xmlSchemaObject
=
xmlSchemaObject
.
Parent
)
19
{
20
if
(
xmlSchemaObject
.Namespaces.TryLookupNamespace(
prefix
,
out
var
ns))
21
{
22
return
ns;
23
}
24
}
25
if
(
prefix
.Length != 0)
26
{
27
return
null
;
28
}
29
return
string
.Empty;
30
}
31
32
public
override
string
LookupPrefix
(
string
ns)
33
{
34
if
(ns ==
"http://www.w3.org/XML/1998/namespace"
)
35
{
36
return
"xml"
;
37
}
38
for
(
XmlSchemaObject
xmlSchemaObject
=
_node
;
xmlSchemaObject
!=
null
;
xmlSchemaObject
=
xmlSchemaObject
.
Parent
)
39
{
40
if
(
xmlSchemaObject
.Namespaces.TryLookupPrefix(ns,
out
var
prefix
))
41
{
42
return
prefix
;
43
}
44
}
45
return
null
;
46
}
47
}
System.Xml.Schema.SchemaNamespaceManager.SchemaNamespaceManager
SchemaNamespaceManager(XmlSchemaObject node)
Definition
SchemaNamespaceManager.cs:7
System.Xml.Schema.SchemaNamespaceManager.LookupPrefix
override string LookupPrefix(string ns)
Definition
SchemaNamespaceManager.cs:32
System.Xml.Schema.SchemaNamespaceManager._node
readonly XmlSchemaObject _node
Definition
SchemaNamespaceManager.cs:5
System.Xml.Schema.SchemaNamespaceManager.LookupNamespace
override string LookupNamespace(string prefix)
Definition
SchemaNamespaceManager.cs:12
System.Xml.Schema.SchemaNamespaceManager
Definition
SchemaNamespaceManager.cs:4
System.Xml.Schema.XmlSchemaObject.Parent
XmlSchemaObject? Parent
Definition
XmlSchemaObject.cs:60
System.Xml.Schema.XmlSchemaObject
Definition
XmlSchemaObject.cs:6
System.Xml.XmlNamespaceManager
Definition
XmlNamespaceManager.cs:8
System.Xml.Schema
Definition
Extensions.cs:3
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.prefix
@ prefix
source
System.Private.Xml
System.Xml.Schema
SchemaNamespaceManager.cs
Generated by
1.10.0