Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlSchemaComplexType.cs
Go to the documentation of this file.
4
5namespace System.Xml.Schema;
6
8{
10
12
14
16
18
20
22
24
26
28
30
32
34
35 private byte _pvFlags;
36
37 [XmlIgnore]
39
40 [XmlIgnore]
42
43 [XmlIgnore]
45
46 internal static ContentValidator AnyTypeContentValidator => s_anyTypeLax.ElementDecl.ContentValidator;
47
48 [XmlAttribute("abstract")]
49 [DefaultValue(false)]
50 public bool IsAbstract
51 {
52 get
53 {
54 return (_pvFlags & 4) != 0;
55 }
56 set
57 {
58 if (value)
59 {
60 _pvFlags |= 4;
61 }
62 else
63 {
64 _pvFlags = (byte)(_pvFlags & 0xFFFFFFFBu);
65 }
66 }
67 }
68
69 [XmlAttribute("block")]
70 [DefaultValue(XmlSchemaDerivationMethod.None)]
72 {
73 get
74 {
75 return _block;
76 }
77 set
78 {
79 _block = value;
80 }
81 }
82
83 [XmlAttribute("mixed")]
84 [DefaultValue(false)]
85 public override bool IsMixed
86 {
87 get
88 {
89 return (_pvFlags & 2) != 0;
90 }
91 set
92 {
93 if (value)
94 {
95 _pvFlags |= 2;
96 }
97 else
98 {
99 _pvFlags = (byte)(_pvFlags & 0xFFFFFFFDu);
100 }
101 }
102 }
103
104 [XmlElement("simpleContent", typeof(XmlSchemaSimpleContent))]
105 [XmlElement("complexContent", typeof(XmlSchemaComplexContent))]
107 {
108 get
109 {
110 return _contentModel;
111 }
112 set
113 {
115 }
116 }
117
119 [XmlElement("choice", typeof(XmlSchemaChoice))]
121 [XmlElement("sequence", typeof(XmlSchemaSequence))]
123 {
124 get
125 {
126 return _particle;
127 }
128 set
129 {
131 }
132 }
133
134 [XmlElement("attribute", typeof(XmlSchemaAttribute))]
135 [XmlElement("attributeGroup", typeof(XmlSchemaAttributeGroupRef))]
137 {
138 get
139 {
140 if (_attributes == null)
141 {
143 }
144 return _attributes;
145 }
146 }
147
148 [XmlElement("anyAttribute")]
150 {
151 get
152 {
153 return _anyAttribute;
154 }
155 set
156 {
158 }
159 }
160
161 [XmlIgnore]
162 public XmlSchemaContentType ContentType => base.SchemaContentType;
163
164 [XmlIgnore]
166
167 [XmlIgnore]
169
170 [XmlIgnore]
172 {
173 get
174 {
175 if (_attributeUses == null)
176 {
178 }
179 return _attributeUses;
180 }
181 }
182
183 [XmlIgnore]
185
186 [XmlIgnore]
188 {
189 get
190 {
191 if (_localElements == null)
192 {
194 }
195 return _localElements;
196 }
197 }
198
199 internal bool HasWildCard
200 {
201 get
202 {
203 return (_pvFlags & 1) != 0;
204 }
205 set
206 {
207 if (value)
208 {
209 _pvFlags |= 1;
210 }
211 else
212 {
213 _pvFlags = (byte)(_pvFlags & 0xFFFFFFFEu);
214 }
215 }
216 }
217
245
258
260 {
265 xmlSchemaAny.MaxOccurs = decimal.MaxValue;
267 xmlSchemaAny.BuildNamespaceList(null);
270 xmlSchemaComplexType.SetContentTypeParticle(xmlSchemaSequence);
271 xmlSchemaComplexType.SetContentType(XmlSchemaContentType.Mixed);
276 particleContentValidator.OpenGroup();
277 particleContentValidator.AddNamespaceList(xmlSchemaAny.NamespaceList, xmlSchemaAny);
278 particleContentValidator.AddStar();
279 particleContentValidator.CloseGroup();
284 xmlSchemaAnyAttribute.BuildNamespaceList(null);
285 xmlSchemaComplexType.SetAttributeWildcard(xmlSchemaAnyAttribute);
288 }
289
294
299
304
309
310 internal bool ContainsIdAttribute(bool findAll)
311 {
312 int num = 0;
314 {
315 if (value.Use == XmlSchemaUse.Prohibited)
316 {
317 continue;
318 }
319 XmlSchemaDatatype datatype = value.Datatype;
320 if (datatype != null && datatype.TypeCode == XmlTypeCode.Id)
321 {
322 num++;
323 if (num > 1)
324 {
325 break;
326 }
327 }
328 }
329 if (!findAll)
330 {
331 return num > 0;
332 }
333 return num > 1;
334 }
335
336 internal override XmlSchemaObject Clone()
337 {
338 return Clone(null);
339 }
340
342 {
344 if (xmlSchemaComplexType.ContentModel != null)
345 {
347 {
350 {
355 }
356 else
357 {
363 }
365 }
366 else
367 {
371 {
376 {
378 }
380 }
381 else
382 {
388 {
390 }
392 }
394 }
395 }
396 else
397 {
399 {
401 }
403 }
404 xmlSchemaComplexType.ClearCompiledState();
406 }
407
416
442
453
454 [return: NotNullIfNotNull("particle")]
477
479 {
480 if (element.Form == XmlSchemaForm.None && parentSchema != null)
481 {
482 return parentSchema.ElementFormDefault;
483 }
484 return element.Form;
485 }
486
488 {
490 {
491 bool flag = false;
492 int num = 0;
493 while (num < xmlSchemaGroupBase.Items.Count && !flag)
494 {
497 }
498 return flag;
499 }
500 if (particle is XmlSchemaGroupRef)
501 {
502 return true;
503 }
504 return false;
505 }
506
507 internal static bool HasAttributeQNameRef(XmlSchemaObjectCollection attributes)
508 {
509 for (int i = 0; i < attributes.Count; i++)
510 {
511 if (attributes[i] is XmlSchemaAttributeGroupRef)
512 {
513 return true;
514 }
516 if (!xmlSchemaAttribute.RefName.IsEmpty || !xmlSchemaAttribute.SchemaTypeName.IsEmpty)
517 {
518 return true;
519 }
520 }
521 return false;
522 }
523}
static SchemaElementDecl CreateAnyTypeElementDecl()
static readonly XmlSchemaComplexType s_anyTypeLax
static bool HasAttributeQNameRef(XmlSchemaObjectCollection attributes)
static bool HasParticleRef(XmlSchemaParticle particle, XmlSchema parentSchema)
void SetAttributes(XmlSchemaObjectCollection newAttributes)
static XmlSchemaComplexType CreateUntypedAnyType()
static XmlSchemaParticle CloneParticle(XmlSchemaParticle particle, XmlSchema parentSchema)
static XmlSchemaObjectCollection CloneGroupBaseParticles(XmlSchemaObjectCollection groupBaseParticles, XmlSchema parentSchema)
static XmlSchemaComplexType CreateAnyType(XmlSchemaContentProcessing processContents)
void SetAttributeWildcard(XmlSchemaAnyAttribute value)
static readonly XmlSchemaComplexType s_untypedAnyType
static XmlSchemaObjectCollection CloneAttributes(XmlSchemaObjectCollection attributes)
static readonly XmlSchemaComplexType s_anyTypeSkip
static XmlSchemaForm GetResolvedElementForm(XmlSchema parentSchema, XmlSchemaElement element)
void SetBlockResolved(XmlSchemaDerivationMethod value)
void SetContentTypeParticle(XmlSchemaParticle value)
XmlSchemaObject Clone(XmlSchema parentSchema)
static XmlSchemaComplexType UntypedAnyType
virtual XmlSchemaObject Clone()
static readonly XmlSchemaParticle Empty
static readonly XmlQualifiedName Empty