Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PreprocessSimpleType()

void System.Xml.Schema.Preprocessor.PreprocessSimpleType ( XmlSchemaSimpleType simpleType,
bool local )
inlineprivate

Definition at line 1340 of file Preprocessor.cs.

1341 {
1342 if (local)
1343 {
1344 if (simpleType.Name != null)
1345 {
1347 }
1348 }
1349 else
1350 {
1351 if (simpleType.Name != null)
1352 {
1354 simpleType.SetQualifiedName(new XmlQualifiedName(simpleType.Name, _targetNamespace));
1355 }
1356 else
1357 {
1359 }
1360 if (simpleType.Final == XmlSchemaDerivationMethod.All)
1361 {
1362 simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1363 }
1364 else if (simpleType.Final == XmlSchemaDerivationMethod.None)
1365 {
1366 if (_finalDefault == XmlSchemaDerivationMethod.All)
1367 {
1368 simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1369 }
1370 else
1371 {
1372 simpleType.SetFinalResolved(_finalDefault & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union));
1373 }
1374 }
1375 else
1376 {
1377 if (((uint)simpleType.Final & 0xFFFFFFE1u) != 0)
1378 {
1380 }
1381 simpleType.SetFinalResolved(simpleType.Final & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union));
1382 }
1383 }
1384 if (simpleType.Content == null)
1385 {
1387 }
1388 else if (simpleType.Content is XmlSchemaSimpleTypeRestriction)
1389 {
1390 XmlSchemaSimpleTypeRestriction xmlSchemaSimpleTypeRestriction = (XmlSchemaSimpleTypeRestriction)simpleType.Content;
1392 for (int i = 0; i < xmlSchemaSimpleTypeRestriction.Facets.Count; i++)
1393 {
1395 }
1396 if (xmlSchemaSimpleTypeRestriction.BaseType != null)
1397 {
1398 if (!xmlSchemaSimpleTypeRestriction.BaseTypeName.IsEmpty)
1399 {
1401 }
1403 }
1404 else if (xmlSchemaSimpleTypeRestriction.BaseTypeName.IsEmpty)
1405 {
1407 }
1408 else
1409 {
1411 }
1414 }
1415 else if (simpleType.Content is XmlSchemaSimpleTypeList)
1416 {
1417 XmlSchemaSimpleTypeList xmlSchemaSimpleTypeList = (XmlSchemaSimpleTypeList)simpleType.Content;
1419 if (xmlSchemaSimpleTypeList.ItemType != null)
1420 {
1421 if (!xmlSchemaSimpleTypeList.ItemTypeName.IsEmpty)
1422 {
1424 }
1427 }
1428 else if (xmlSchemaSimpleTypeList.ItemTypeName.IsEmpty)
1429 {
1431 }
1432 else
1433 {
1435 }
1438 }
1439 else
1440 {
1441 XmlSchemaSimpleTypeUnion xmlSchemaSimpleTypeUnion = (XmlSchemaSimpleTypeUnion)simpleType.Content;
1443 int num = xmlSchemaSimpleTypeUnion.BaseTypes.Count;
1444 if (xmlSchemaSimpleTypeUnion.MemberTypes != null)
1445 {
1446 num += xmlSchemaSimpleTypeUnion.MemberTypes.Length;
1447 XmlQualifiedName[] memberTypes = xmlSchemaSimpleTypeUnion.MemberTypes;
1448 for (int j = 0; j < memberTypes.Length; j++)
1449 {
1451 }
1452 }
1453 if (num == 0)
1454 {
1456 }
1457 for (int k = 0; k < xmlSchemaSimpleTypeUnion.BaseTypes.Count; k++)
1458 {
1459 XmlSchemaSimpleType xmlSchemaSimpleType = (XmlSchemaSimpleType)xmlSchemaSimpleTypeUnion.BaseTypes[k];
1462 }
1465 }
1467 }
static string Sch_SimpleTypeRestRefBase
Definition SR.cs:848
static string Sch_SimpleTypeUnionNoBase
Definition SR.cs:856
static string Sch_SimpleTypeListRefBaseNone
Definition SR.cs:854
static string Sch_NoSimpleTypeContent
Definition SR.cs:846
static string Sch_ForbiddenAttribute
Definition SR.cs:544
static string Sch_InvalidSimpleTypeFinalValue
Definition SR.cs:514
static string Sch_SimpleTypeListRefBase
Definition SR.cs:852
static string Sch_SimpleTypeRestRefBaseNone
Definition SR.cs:850
static string Sch_MissRequiredAttribute
Definition SR.cs:490
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void PreprocessAnnotation(XmlSchemaObject schemaObject)
void ValidateNameAttribute(XmlSchemaObject xso)
void SetParent(XmlSchemaObject child, XmlSchemaObject parent)
void PreprocessSimpleType(XmlSchemaSimpleType simpleType, bool local)
void ValidateIdAttribute(XmlSchemaObject xso)
XmlSchemaDerivationMethod _finalDefault
void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.Preprocessor._finalDefault, System.Xml.Schema.Preprocessor._targetNamespace, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Schema.Preprocessor.PreprocessAnnotation(), System.Xml.Schema.Preprocessor.PreprocessSimpleType(), System.SR.Sch_ForbiddenAttribute, System.SR.Sch_InvalidSimpleTypeFinalValue, System.SR.Sch_MissRequiredAttribute, System.SR.Sch_NoSimpleTypeContent, System.SR.Sch_SimpleTypeListRefBase, System.SR.Sch_SimpleTypeListRefBaseNone, System.SR.Sch_SimpleTypeRestRefBase, System.SR.Sch_SimpleTypeRestRefBaseNone, System.SR.Sch_SimpleTypeUnionNoBase, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.Xml.Schema.Preprocessor.SetParent(), System.Xml.Schema.Preprocessor.ValidateIdAttribute(), System.Xml.Schema.Preprocessor.ValidateNameAttribute(), and System.Xml.Schema.Preprocessor.ValidateQNameAttribute().

Referenced by System.Xml.Schema.Preprocessor.Preprocess(), System.Xml.Schema.Preprocessor.PreprocessAttributeContent(), System.Xml.Schema.Preprocessor.PreprocessComplexType(), System.Xml.Schema.Preprocessor.PreprocessElementContent(), System.Xml.Schema.Preprocessor.PreprocessRedefine(), and System.Xml.Schema.Preprocessor.PreprocessSimpleType().