Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OutputScope.cs
Go to the documentation of this file.
2
4
5internal sealed class OutputScope : DocumentScope
6{
7 private string _name;
8
9 private string _nsUri;
10
11 private string _prefix;
12
14
15 private string _lang;
16
17 private bool _mixed;
18
19 private bool _toCData;
20
22
23 internal string Name => _name;
24
25 internal string Namespace => _nsUri;
26
27 internal string Prefix
28 {
29 get
30 {
31 return _prefix;
32 }
33 set
34 {
35 _prefix = value;
36 }
37 }
38
39 internal XmlSpace Space
40 {
41 get
42 {
43 return _space;
44 }
45 set
46 {
47 _space = value;
48 }
49 }
50
51 internal string Lang
52 {
53 get
54 {
55 return _lang;
56 }
57 set
58 {
59 _lang = value;
60 }
61 }
62
63 internal bool Mixed
64 {
65 get
66 {
67 return _mixed;
68 }
69 set
70 {
71 _mixed = value;
72 }
73 }
74
75 internal bool ToCData
76 {
77 get
78 {
79 return _toCData;
80 }
81 set
82 {
84 }
85 }
86
88 {
89 get
90 {
91 return _htmlElementProps;
92 }
93 set
94 {
96 }
97 }
98
99 internal OutputScope()
100 {
101 Init(string.Empty, string.Empty, string.Empty, XmlSpace.None, string.Empty, mixed: false);
102 }
103
104 [MemberNotNull("_name")]
105 [MemberNotNull("_nsUri")]
106 [MemberNotNull("_prefix")]
107 [MemberNotNull("_lang")]
108 internal void Init(string name, string nspace, string prefix, XmlSpace space, string lang, bool mixed)
109 {
110 scopes = null;
111 _name = name;
112 _nsUri = nspace;
113 _prefix = prefix;
114 _space = space;
115 _lang = lang;
116 _mixed = mixed;
117 _toCData = false;
118 _htmlElementProps = null;
119 }
120
121 internal bool FindPrefix(string urn, out string prefix)
122 {
123 for (NamespaceDecl next = scopes; next != null; next = next.Next)
124 {
125 if (Ref.Equal(next.Uri, urn) && next.Prefix != null && next.Prefix.Length > 0)
126 {
127 prefix = next.Prefix;
128 return true;
129 }
130 }
131 prefix = string.Empty;
132 return false;
133 }
134}
static bool Equal(string strA, string strB)
Definition Ref.cs:5
bool FindPrefix(string urn, out string prefix)
void Init(string name, string nspace, string prefix, XmlSpace space, string lang, bool mixed)