Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TextAction.cs
Go to the documentation of this file.
1
using
System.Xml.XPath
;
2
3
namespace
System.Xml.Xsl.XsltOld
;
4
5
internal
class
TextAction
:
CompiledAction
6
{
7
private
bool
_disableOutputEscaping
;
8
9
private
string
_text
;
10
11
internal
override
void
Compile
(
Compiler
compiler
)
12
{
13
CompileAttributes
(
compiler
);
14
CompileContent
(
compiler
);
15
}
16
17
internal
override
bool
CompileAttribute
(
Compiler
compiler
)
18
{
19
string
localName =
compiler
.Input.LocalName;
20
string
value
=
compiler
.Input.Value;
21
if
(
Ref
.
Equal
(localName,
compiler
.Atoms.DisableOutputEscaping))
22
{
23
_disableOutputEscaping
=
compiler
.GetYesNo(
value
);
24
return
true
;
25
}
26
return
false
;
27
}
28
29
private
void
CompileContent
(
Compiler
compiler
)
30
{
31
if
(!
compiler
.Recurse())
32
{
33
return
;
34
}
35
NavigatorInput
input
=
compiler
.Input;
36
_text
=
string
.Empty;
37
do
38
{
39
switch
(
input
.NodeType)
40
{
41
case
XPathNodeType
.Text:
42
case
XPathNodeType
.SignificantWhitespace:
43
case
XPathNodeType
.Whitespace:
44
_text
+=
input
.Value;
45
break
;
46
default
:
47
throw
compiler
.UnexpectedKeyword();
48
case
XPathNodeType
.ProcessingInstruction:
49
case
XPathNodeType
.Comment:
50
break
;
51
}
52
}
53
while
(
compiler
.Advance());
54
compiler
.ToParent();
55
}
56
57
internal
override
void
Execute
(
Processor
processor
,
ActionFrame
frame)
58
{
59
if
(frame.
State
== 0 &&
processor
.TextEvent(
_text
,
_disableOutputEscaping
))
60
{
61
frame.
Finished
();
62
}
63
}
64
}
System.Xml.Ref.Equal
static bool Equal(string strA, string strB)
Definition
Ref.cs:5
System.Xml.Ref
Definition
Ref.cs:4
System.Xml.Xsl.XsltOld.ActionFrame.State
int State
Definition
ActionFrame.cs:78
System.Xml.Xsl.XsltOld.ActionFrame.Finished
void Finished()
Definition
ActionFrame.cs:209
System.Xml.Xsl.XsltOld.ActionFrame
Definition
ActionFrame.cs:10
System.Xml.Xsl.XsltOld.CompiledAction.CompileAttributes
void CompileAttributes(Compiler compiler)
Definition
CompiledAction.cs:14
System.Xml.Xsl.XsltOld.CompiledAction
Definition
CompiledAction.cs:6
System.Xml.Xsl.XsltOld.Compiler
Definition
Compiler.cs:15
System.Xml.Xsl.XsltOld.NavigatorInput
Definition
NavigatorInput.cs:7
System.Xml.Xsl.XsltOld.Processor
Definition
Processor.cs:14
System.Xml.Xsl.XsltOld.TextAction.CompileContent
void CompileContent(Compiler compiler)
Definition
TextAction.cs:29
System.Xml.Xsl.XsltOld.TextAction._text
string _text
Definition
TextAction.cs:9
System.Xml.Xsl.XsltOld.TextAction.Execute
override void Execute(Processor processor, ActionFrame frame)
Definition
TextAction.cs:57
System.Xml.Xsl.XsltOld.TextAction.CompileAttribute
override bool CompileAttribute(Compiler compiler)
Definition
TextAction.cs:17
System.Xml.Xsl.XsltOld.TextAction.Compile
override void Compile(Compiler compiler)
Definition
TextAction.cs:11
System.Xml.Xsl.XsltOld.TextAction._disableOutputEscaping
bool _disableOutputEscaping
Definition
TextAction.cs:7
System.Xml.Xsl.XsltOld.TextAction
Definition
TextAction.cs:6
System.Xml.XPath.XPathNodeType
XPathNodeType
Definition
XPathNodeType.cs:4
System.Xml.XPath
Definition
Extensions.cs:5
System.Xml.Xsl.XsltOld
Definition
IXsltDebugger.cs:1
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.value
@ value
System.ExceptionArgument.input
@ input
source
System.Private.Xml
System.Xml.Xsl.XsltOld
TextAction.cs
Generated by
1.10.0