Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BeginEvent.cs
Go to the documentation of this file.
2
4
5internal class BeginEvent : Event
6{
7 private readonly XPathNodeType _nodeType;
8
9 private string _namespaceUri;
10
11 private readonly string _name;
12
13 private string _prefix;
14
15 private readonly bool _empty;
16
17 private readonly object _htmlProps;
18
20 {
23 _namespaceUri = input.NamespaceURI;
24 _name = input.LocalName;
25 _prefix = input.Prefix;
26 _empty = input.IsEmptyTag;
27 if (_nodeType == XPathNodeType.Element)
28 {
30 }
31 else if (_nodeType == XPathNodeType.Attribute)
32 {
34 }
35 }
36
38 {
39 if (_nodeType == XPathNodeType.Attribute && _namespaceUri.Length == 0)
40 {
41 return;
42 }
44 if (namespaceInfo != null)
45 {
46 _namespaceUri = namespaceInfo.nameSpace;
47 if (namespaceInfo.prefix != null)
48 {
49 _prefix = namespaceInfo.prefix;
50 }
51 }
52 }
53
54 public override bool Output(Processor processor, ActionFrame frame)
55 {
56 return processor.BeginEvent(_nodeType, _prefix, _name, _namespaceUri, _empty, _htmlProps, search: false);
57 }
58}
override bool Output(Processor processor, ActionFrame frame)
Definition BeginEvent.cs:54
override void ReplaceNamespaceAlias(Compiler compiler)
Definition BeginEvent.cs:37
readonly XPathNodeType _nodeType
Definition BeginEvent.cs:7
BeginEvent(Compiler compiler)
Definition BeginEvent.cs:19
static HtmlAttributeProps GetProps(string name)
static HtmlElementProps GetProps(string name)