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

◆ AddSchema()

void System.Xml.Schema.XmlSchemaValidator.AddSchema ( XmlSchema schema)
inline

Definition at line 393 of file XmlSchemaValidator.cs.

394 {
395 if (schema == null)
396 {
397 throw new ArgumentNullException("schema");
398 }
399 if ((_validationFlags & XmlSchemaValidationFlags.ProcessInlineSchema) == 0)
400 {
401 return;
402 }
403 string text = schema.TargetNamespace;
404 if (text == null)
405 {
406 text = string.Empty;
407 }
411 if (_validatedNamespaces[text] != null && _schemaSet.FindSchemaByNSAndUrl(schema.BaseUri, text, array) == null)
412 {
414 }
415 if (schema.ErrorCount != 0)
416 {
417 return;
418 }
419 try
420 {
423 }
424 catch (XmlSchemaException ex)
425 {
427 {
428 schema.BaseUri.ToString(),
429 ex.Message
430 }, ex);
431 }
432 for (int i = 0; i < schema.ImportedSchemas.Count; i++)
433 {
434 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[i];
435 text = xmlSchema.TargetNamespace;
436 if (text == null)
437 {
438 text = string.Empty;
439 }
441 {
444 break;
445 }
446 }
447 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static string Sch_ComponentAlreadySeenForNS
Definition SR.cs:1164
static string Sch_CannotLoadSchema
Definition SR.cs:1078
Definition SR.cs:7
bool RemoveRecursive(XmlSchema schemaToRemove)
XmlSchema? Add(string? targetNamespace, string schemaUri)
XmlSchema FindSchemaByNSAndUrl(Uri schemaUri, string ns, DictionaryEntry[] locationsTable)
readonly XmlSchemaValidationFlags _validationFlags

References System.Xml.Schema.XmlSchemaValidator._schemaSet, System.Xml.Schema.XmlSchemaValidator._validatedNamespaces, System.Xml.Schema.XmlSchemaValidator._validationFlags, System.Xml.Schema.XmlSchemaSet.Add(), System.array, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Schema.XmlSchemaSet.FindSchemaByNSAndUrl(), System.Xml.Schema.XmlSchemaValidator.RecompileSchemaSet(), System.Xml.Schema.XmlSchemaSet.RemoveRecursive(), System.SR.Sch_CannotLoadSchema, System.SR.Sch_ComponentAlreadySeenForNS, System.Xml.Schema.XmlSchemaSet.SchemaLocations, System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(), and System.text.

Referenced by System.Xml.XsdValidatingReader.ProcessInlineSchema(), and System.Xml.XsdValidatingReader.ProcessInlineSchemaAsync().