Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
QilStrConcatenator.cs
Go to the documentation of this file.
1using System.Text;
4
5namespace System.Xml.Xsl.Xslt;
6
7internal sealed class QilStrConcatenator
8{
9 private readonly XPathQilFactory _f;
10
11 private readonly StringBuilder _builder;
12
14
15 private bool _inUse;
16
18 {
19 _f = f;
20 _builder = new StringBuilder();
21 }
22
23 public void Reset()
24 {
25 _inUse = true;
27 _concat = null;
28 }
29
30 private void FlushBuilder()
31 {
32 if (_concat == null)
33 {
35 }
36 if (_builder.Length != 0)
37 {
40 }
41 }
42
43 public void Append(string value)
44 {
46 }
47
48 public void Append(char value)
49 {
51 }
52
53 public void Append(QilNode value)
54 {
55 if (value != null)
56 {
57 if (value.NodeType == QilNodeType.LiteralString)
58 {
60 return;
61 }
64 }
65 }
66
67 public QilNode ToQil()
68 {
69 _inUse = false;
70 if (_concat == null)
71 {
72 return _f.String(_builder.ToString());
73 }
75 return _f.StrConcat(_concat);
76 }
77}
override string ToString()
StringBuilder Append(char value, int repeatCount)
QilList Sequence(IList< QilNode > values)
Definition QilFactory.cs:44
virtual void Add(QilNode node)
Definition QilNode.cs:121