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

◆ PreprocessSimpleType()

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

Definition at line 1088 of file SchemaCollectionPreprocessor.cs.

1089 {
1090 if (local)
1091 {
1092 if (simpleType.Name != null)
1093 {
1095 }
1096 }
1097 else
1098 {
1099 if (simpleType.Name != null)
1100 {
1102 simpleType.SetQualifiedName(new XmlQualifiedName(simpleType.Name, _targetNamespace));
1103 }
1104 else
1105 {
1107 }
1108 if (simpleType.Final == XmlSchemaDerivationMethod.All)
1109 {
1110 simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1111 }
1112 else if (simpleType.Final == XmlSchemaDerivationMethod.None)
1113 {
1114 if (_finalDefault == XmlSchemaDerivationMethod.All)
1115 {
1116 simpleType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1117 }
1118 else
1119 {
1120 simpleType.SetFinalResolved(_finalDefault & (XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union));
1121 }
1122 }
1123 else
1124 {
1125 if (((uint)simpleType.Final & 0xFFFFFFE3u) != 0)
1126 {
1128 }
1129 simpleType.SetFinalResolved(simpleType.Final & (XmlSchemaDerivationMethod.Restriction | XmlSchemaDerivationMethod.List | XmlSchemaDerivationMethod.Union));
1130 }
1131 }
1132 if (simpleType.Content == null)
1133 {
1135 }
1136 else if (simpleType.Content is XmlSchemaSimpleTypeRestriction)
1137 {
1138 XmlSchemaSimpleTypeRestriction xmlSchemaSimpleTypeRestriction = (XmlSchemaSimpleTypeRestriction)simpleType.Content;
1140 for (int i = 0; i < xmlSchemaSimpleTypeRestriction.Facets.Count; i++)
1141 {
1143 }
1144 if (xmlSchemaSimpleTypeRestriction.BaseType != null)
1145 {
1146 if (!xmlSchemaSimpleTypeRestriction.BaseTypeName.IsEmpty)
1147 {
1149 }
1151 }
1152 else if (xmlSchemaSimpleTypeRestriction.BaseTypeName.IsEmpty)
1153 {
1155 }
1156 else
1157 {
1159 }
1162 }
1163 else if (simpleType.Content is XmlSchemaSimpleTypeList)
1164 {
1165 XmlSchemaSimpleTypeList xmlSchemaSimpleTypeList = (XmlSchemaSimpleTypeList)simpleType.Content;
1167 if (xmlSchemaSimpleTypeList.ItemType != null)
1168 {
1169 if (!xmlSchemaSimpleTypeList.ItemTypeName.IsEmpty)
1170 {
1172 }
1175 }
1176 else if (xmlSchemaSimpleTypeList.ItemTypeName.IsEmpty)
1177 {
1179 }
1180 else
1181 {
1183 }
1186 }
1187 else
1188 {
1189 XmlSchemaSimpleTypeUnion xmlSchemaSimpleTypeUnion = (XmlSchemaSimpleTypeUnion)simpleType.Content;
1191 int num = xmlSchemaSimpleTypeUnion.BaseTypes.Count;
1192 if (xmlSchemaSimpleTypeUnion.MemberTypes != null)
1193 {
1194 num += xmlSchemaSimpleTypeUnion.MemberTypes.Length;
1195 for (int j = 0; j < xmlSchemaSimpleTypeUnion.MemberTypes.Length; j++)
1196 {
1198 }
1199 }
1200 if (num == 0)
1201 {
1203 }
1204 for (int k = 0; k < xmlSchemaSimpleTypeUnion.BaseTypes.Count; k++)
1205 {
1207 PreprocessSimpleType((XmlSchemaSimpleType)xmlSchemaSimpleTypeUnion.BaseTypes[k], local: true);
1208 }
1211 }
1213 }
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 SetParent(XmlSchemaObject child, XmlSchemaObject parent)
void PreprocessSimpleType(XmlSchemaSimpleType simpleType, bool local)
void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.SchemaCollectionPreprocessor._finalDefault, System.Xml.Schema.SchemaCollectionPreprocessor._targetNamespace, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessAnnotation(), System.Xml.Schema.SchemaCollectionPreprocessor.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.SchemaCollectionPreprocessor.SetParent(), System.Xml.Schema.SchemaCollectionPreprocessor.ValidateIdAttribute(), System.Xml.Schema.SchemaCollectionPreprocessor.ValidateNameAttribute(), and System.Xml.Schema.SchemaCollectionPreprocessor.ValidateQNameAttribute().

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