Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NavigatorConstructor.cs
Go to the documentation of this file.
1
using
System.Xml.XPath
;
2
3
namespace
System.Xml.Xsl.Runtime
;
4
5
internal
sealed
class
NavigatorConstructor
6
{
7
private
object
_cache
;
8
9
public
XPathNavigator
GetNavigator
(
XmlEventCache
events,
XmlNameTable
nameTable
)
10
{
11
if
(
_cache
==
null
)
12
{
13
XPathDocument
xPathDocument
=
new
XPathDocument
(
nameTable
);
14
XmlRawWriter
xmlRawWriter
=
xPathDocument
.LoadFromWriter(
XPathDocument
.
LoadFlags
.AtomizeNames | ((!events.
HasRootNode
) ?
XPathDocument
.
LoadFlags
.Fragment :
XPathDocument
.
LoadFlags
.None), events.
BaseUri
);
15
events.
EventsToWriter
(
xmlRawWriter
);
16
xmlRawWriter
.Close();
17
_cache
=
xPathDocument
;
18
}
19
return
((
XPathDocument
)
_cache
).CreateNavigator();
20
}
21
22
public
XPathNavigator
GetNavigator
(
string
text
,
string
baseUri,
XmlNameTable
nameTable
)
23
{
24
if
(
_cache
==
null
)
25
{
26
XPathDocument
xPathDocument
=
new
XPathDocument
(
nameTable
);
27
XmlRawWriter
xmlRawWriter
=
xPathDocument
.LoadFromWriter(
XPathDocument
.
LoadFlags
.AtomizeNames, baseUri);
28
xmlRawWriter
.
WriteString
(
text
);
29
xmlRawWriter
.Close();
30
_cache
=
xPathDocument
;
31
}
32
return
((
XPathDocument
)
_cache
).CreateNavigator();
33
}
34
}
System.Xml.XPath.XPathDocument.LoadFlags
LoadFlags
Definition
XPathDocument.cs:11
System.Xml.XPath.XPathDocument
Definition
XPathDocument.cs:9
System.Xml.XPath.XPathNavigator
Definition
XPathNavigator.cs:15
System.Xml.XmlEventCache.HasRootNode
bool HasRootNode
Definition
XmlEventCache.cs:118
System.Xml.XmlEventCache.BaseUri
string BaseUri
Definition
XmlEventCache.cs:116
System.Xml.XmlEventCache.EventsToWriter
void EventsToWriter(XmlWriter writer)
Definition
XmlEventCache.cs:136
System.Xml.XmlEventCache
Definition
XmlEventCache.cs:9
System.Xml.XmlNameTable
Definition
XmlNameTable.cs:4
System.Xml.XmlRawWriter
Definition
XmlRawWriter.cs:8
System.Xml.XmlWriter.WriteString
void WriteString(string? text)
System.Xml.Xsl.Runtime.NavigatorConstructor._cache
object _cache
Definition
NavigatorConstructor.cs:7
System.Xml.Xsl.Runtime.NavigatorConstructor.GetNavigator
XPathNavigator GetNavigator(XmlEventCache events, XmlNameTable nameTable)
Definition
NavigatorConstructor.cs:9
System.Xml.Xsl.Runtime.NavigatorConstructor.GetNavigator
XPathNavigator GetNavigator(string text, string baseUri, XmlNameTable nameTable)
Definition
NavigatorConstructor.cs:22
System.Xml.Xsl.Runtime.NavigatorConstructor
Definition
NavigatorConstructor.cs:6
System.Xml.XPath
Definition
Extensions.cs:5
System.Xml.Xsl.Runtime
Definition
AncestorDocOrderIterator.cs:4
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.text
@ text
source
System.Private.Xml
System.Xml.Xsl.Runtime
NavigatorConstructor.cs
Generated by
1.10.0