Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SchemaDeclBase.cs
Go to the documentation of this file.
3
4namespace System.Xml.Schema;
5
6internal abstract class SchemaDeclBase
7{
8 internal enum Use
9 {
10 Default,
12 Implied,
13 Fixed,
15 }
16
18
19 protected string prefix;
20
21 protected bool isDeclaredInExternal;
22
23 protected Use presence;
24
26
28
29 protected string defaultValueRaw;
30
31 protected object defaultValueTyped;
32
33 protected long maxLength;
34
35 protected long minLength;
36
38
40 {
41 get
42 {
43 return name;
44 }
45 set
46 {
47 name = value;
48 }
49 }
50
51 internal string Prefix
52 {
53 get
54 {
55 if (prefix != null)
56 {
57 return prefix;
58 }
59 return string.Empty;
60 }
62 set
63 {
64 prefix = value;
65 }
66 }
67
69 {
70 get
71 {
73 }
74 set
75 {
77 }
78 }
79
80 internal Use Presence
81 {
82 get
83 {
84 return presence;
85 }
86 set
87 {
89 }
90 }
91
92 internal long MaxLength
93 {
94 get
95 {
96 return maxLength;
97 }
98 set
99 {
101 }
102 }
103
104 internal long MinLength
105 {
106 get
107 {
108 return minLength;
109 }
110 set
111 {
113 }
114 }
115
117 {
118 get
119 {
120 return schemaType;
121 }
122 set
123 {
125 }
126 }
127
129 {
130 get
131 {
132 return datatype;
133 }
134 set
135 {
136 datatype = value;
137 }
138 }
139
141 {
142 get
143 {
144 return values;
145 }
146 set
147 {
148 values = value;
149 }
150 }
151
152 internal string DefaultValueRaw
153 {
154 get
155 {
156 if (defaultValueRaw == null)
157 {
158 return string.Empty;
159 }
160 return defaultValueRaw;
161 }
162 set
163 {
165 }
166 }
167
168 internal object DefaultValueTyped
169 {
170 get
171 {
172 return defaultValueTyped;
173 }
174 set
175 {
177 }
178 }
179
181 {
182 this.name = name;
184 maxLength = -1L;
185 minLength = -1L;
186 }
187
188 protected SchemaDeclBase()
189 {
190 }
191
192 internal void AddValue(string value)
193 {
194 if (values == null)
195 {
196 values = new List<string>();
197 }
199 }
200
201 internal bool CheckEnumeration(object pVal)
202 {
204 {
205 return values.Contains(pVal.ToString());
206 }
207 return true;
208 }
209
210 internal bool CheckValue(object pVal)
211 {
212 if (presence == Use.Fixed || presence == Use.RequiredFixed)
213 {
214 if (defaultValueTyped != null)
215 {
217 }
218 return false;
219 }
220 return true;
221 }
222}
SchemaDeclBase(XmlQualifiedName name, string prefix)
bool IsEqual(object o1, object o2)
static readonly XmlQualifiedName Empty