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

◆ AddToTable()

bool System.Xml.Schema.XmlSchemaSet.AddToTable ( XmlSchemaObjectTable table,
XmlQualifiedName qname,
XmlSchemaObject item )
inlineprivate

Definition at line 1166 of file XmlSchemaSet.cs.

1167 {
1168 if (qname.Name.Length == 0)
1169 {
1170 return true;
1171 }
1172 XmlSchemaObject xmlSchemaObject = table[qname];
1173 if (xmlSchemaObject != null)
1174 {
1175 if (xmlSchemaObject == item || xmlSchemaObject.SourceUri == item.SourceUri)
1176 {
1177 return true;
1178 }
1179 string res = string.Empty;
1180 if (item is XmlSchemaComplexType)
1181 {
1183 }
1184 else if (item is XmlSchemaSimpleType)
1185 {
1187 }
1188 else if (item is XmlSchemaElement)
1189 {
1191 }
1192 else if (item is XmlSchemaAttribute)
1193 {
1194 if (qname.Namespace == "http://www.w3.org/XML/1998/namespace")
1195 {
1196 XmlSchema buildInSchema = Preprocessor.GetBuildInSchema();
1197 XmlSchemaObject xmlSchemaObject2 = buildInSchema.Attributes[qname];
1199 {
1200 table.Insert(qname, item);
1201 return true;
1202 }
1203 if (item == xmlSchemaObject2)
1204 {
1205 return true;
1206 }
1207 }
1209 }
1210 SendValidationEvent(new XmlSchemaException(res, qname.ToString()), XmlSeverityType.Error);
1211 return false;
1212 }
1213 table.Add(qname, item);
1214 return true;
1215 }
static string Sch_DupComplexType
Definition SR.cs:528
static string Sch_DupGlobalAttribute
Definition SR.cs:524
static string Sch_DupSimpleType
Definition SR.cs:526
static string Sch_DupGlobalElement
Definition SR.cs:522
Definition SR.cs:7
void SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)

References System.Xml.Schema.XmlSchemaObjectTable.Add(), System.Xml.Schema.Preprocessor.GetBuildInSchema(), System.Xml.Schema.XmlSchemaObjectTable.Insert(), System.item, System.Xml.XmlQualifiedName.Name, System.Xml.XmlQualifiedName.Namespace, System.SR.Sch_DupComplexType, System.SR.Sch_DupGlobalAttribute, System.SR.Sch_DupGlobalElement, System.SR.Sch_DupSimpleType, System.Xml.Schema.XmlSchemaSet.SendValidationEvent(), and System.Xml.XmlQualifiedName.ToString().

Referenced by System.Xml.Schema.XmlSchemaSet.CopyFromCompiledSet(), and System.Xml.Schema.XmlSchemaSet.ProcessNewSubstitutionGroups().