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

◆ Find() [2/3]

object System.Xml.Serialization.XmlSchemas.Find ( XmlQualifiedName name,
Type type,
bool checkCache )
inlinepackage

Definition at line 281 of file XmlSchemas.cs.

282 {
283 if (!IsCompiled)
284 {
285 foreach (XmlSchema item in base.List)
286 {
288 }
289 }
290 IList list = (IList)SchemaSet.Schemas(name.Namespace);
291 if (list == null)
292 {
293 return null;
294 }
295 foreach (XmlSchema item2 in list)
296 {
299 if (typeof(XmlSchemaType).IsAssignableFrom(type))
300 {
301 xmlSchemaObject = item2.SchemaTypes[name];
302 if (xmlSchemaObject == null || !type.IsAssignableFrom(xmlSchemaObject.GetType()))
303 {
304 continue;
305 }
306 }
307 else if (type == typeof(XmlSchemaGroup))
308 {
309 xmlSchemaObject = item2.Groups[name];
310 }
312 {
313 xmlSchemaObject = item2.AttributeGroups[name];
314 }
315 else if (type == typeof(XmlSchemaElement))
316 {
317 xmlSchemaObject = item2.Elements[name];
318 }
319 else if (type == typeof(XmlSchemaAttribute))
320 {
321 xmlSchemaObject = item2.Attributes[name];
322 }
323 else if (type == typeof(XmlSchemaNotation))
324 {
325 xmlSchemaObject = item2.Notations[name];
326 }
328 {
329 xmlSchemaObject = Cache.AddItem(xmlSchemaObject, name, this);
330 }
331 if (xmlSchemaObject != null)
332 {
333 return xmlSchemaObject;
334 }
335 }
336 return null;
337 }
bool IsReference(XmlSchemaObject type)
static void Preprocess(XmlSchema schema)

References System.Xml.Serialization.XmlSchemas._shareTypes, System.Xml.Dictionary, System.Xml.Serialization.XmlSchemas.IsCompiled, System.Xml.Serialization.XmlSchemas.IsReference(), System.item, System.list, System.Xml.Serialization.XmlSchemas.Preprocess(), System.Xml.Schema.XmlSchemaSet.Schemas(), System.Xml.Serialization.XmlSchemas.SchemaSet, and System.type.