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

◆ FindSchemaByNSAndUrl()

XmlSchema System.Xml.Schema.XmlSchemaSet.FindSchemaByNSAndUrl ( Uri schemaUri,
string ns,
DictionaryEntry[] locationsTable )
inlinepackage

Definition at line 703 of file XmlSchemaSet.cs.

704 {
705 if (schemaUri == null || schemaUri.OriginalString.Length == 0)
706 {
707 return null;
708 }
709 XmlSchema xmlSchema = null;
710 if (locationsTable == null)
711 {
713 }
714 else
715 {
716 for (int i = 0; i < locationsTable.Length; i++)
717 {
718 if (schemaUri.Equals(locationsTable[i].Key))
719 {
720 xmlSchema = (XmlSchema)locationsTable[i].Value;
721 break;
722 }
723 }
724 }
725 if (xmlSchema != null)
726 {
727 string text = ((xmlSchema.TargetNamespace == null) ? string.Empty : xmlSchema.TargetNamespace);
728 if (text == ns)
729 {
730 return xmlSchema;
731 }
732 if (text.Length == 0)
733 {
734 ChameleonKey key = new ChameleonKey(ns, xmlSchema);
735 xmlSchema = (XmlSchema)_chameleonSchemas[key];
736 }
737 else
738 {
739 xmlSchema = null;
740 }
741 }
742 return xmlSchema;
743 }
readonly Hashtable _chameleonSchemas
readonly Hashtable _schemaLocations

References System.Xml.Schema.XmlSchemaSet._chameleonSchemas, System.Xml.Schema.XmlSchemaSet._schemaLocations, System.Xml.Dictionary, System.key, and System.text.

Referenced by System.Xml.Schema.XmlSchemaSet.Add(), System.Xml.Schema.XmlSchemaSet.Add(), System.Xml.Schema.XmlSchemaValidator.AddSchema(), and System.Xml.Schema.XmlSchemaSet.IsSchemaLoaded().