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

◆ IsSchemaLoaded()

bool System.Xml.Schema.XmlSchemaSet.IsSchemaLoaded ( Uri schemaUri,
string targetNamespace,
out XmlSchema schema )
inlinepackage

Definition at line 1045 of file XmlSchemaSet.cs.

1046 {
1047 schema = null;
1048 if (targetNamespace == null)
1049 {
1050 targetNamespace = string.Empty;
1051 }
1053 {
1054 if (!_schemas.ContainsKey(schema.SchemaId) || (targetNamespace.Length != 0 && !(targetNamespace == schema.TargetNamespace)))
1055 {
1056 if (schema.TargetNamespace == null)
1057 {
1059 if (xmlSchema != null && _schemas.ContainsKey(xmlSchema.SchemaId))
1060 {
1061 schema = xmlSchema;
1062 }
1063 else
1064 {
1066 }
1067 }
1068 else if (targetNamespace.Length != 0 && targetNamespace != schema.TargetNamespace)
1069 {
1070 SendValidationEvent(new XmlSchemaException(System.SR.Sch_MismatchTargetNamespaceEx, new string[2] { targetNamespace, schema.TargetNamespace }), XmlSeverityType.Error);
1071 schema = null;
1072 }
1073 else
1074 {
1076 }
1077 }
1078 return true;
1079 }
1080 return false;
1081 }
virtual bool ContainsKey(object key)
static string Sch_MismatchTargetNamespaceEx
Definition SR.cs:600
Definition SR.cs:7
XmlSchema FindSchemaByNSAndUrl(Uri schemaUri, string ns, DictionaryEntry[] locationsTable)
void AddSchemaToSet(XmlSchema schema)
readonly SortedList _schemas
bool GetSchemaByUri(Uri schemaUri, [NotNullWhen(true)] out XmlSchema schema)
void SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)

References System.Xml.Schema.XmlSchemaSet._schemas, System.Add, System.Xml.Schema.XmlSchemaSet.AddSchemaToSet(), System.Collections.SortedList.ContainsKey(), System.Xml.Dictionary, System.Xml.Schema.XmlSchemaSet.FindSchemaByNSAndUrl(), System.Xml.Schema.XmlSchemaSet.GetSchemaByUri(), System.SR.Sch_MismatchTargetNamespaceEx, and System.Xml.Schema.XmlSchemaSet.SendValidationEvent().

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