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

◆ CompleteValidationError()

static void System.Xml.Schema.XmlSchemaValidator.CompleteValidationError ( ValidationState context,
ValidationEventHandler eventHandler,
object sender,
string sourceUri,
int lineNo,
int linePos,
XmlSchemaSet schemaSet )
inlinestaticpackage

Definition at line 2374 of file XmlSchemaValidator.cs.

2375 {
2376 ArrayList arrayList = null;
2377 bool flag = schemaSet != null;
2378 if (context.ElementDecl != null)
2379 {
2380 arrayList = ((!flag) ? context.ElementDecl.ContentValidator.ExpectedElements(context, isRequiredOnly: true) : context.ElementDecl.ContentValidator.ExpectedParticles(context, isRequiredOnly: true, schemaSet));
2381 }
2382 if (arrayList == null || arrayList.Count == 0)
2383 {
2384 if (context.TooComplex)
2385 {
2386 SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(System.SR.Sch_IncompleteContentComplex, new string[2]
2387 {
2388 BuildElementName(context.LocalName, context.Namespace),
2389 System.SR.Sch_ComplexContentModel
2390 }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2391 }
2392 SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(System.SR.Sch_IncompleteContent, BuildElementName(context.LocalName, context.Namespace), sourceUri, lineNo, linePos), XmlSeverityType.Error);
2393 }
2394 else if (context.TooComplex)
2395 {
2396 SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(System.SR.Sch_IncompleteContentExpectingComplex, new string[3]
2397 {
2398 BuildElementName(context.LocalName, context.Namespace),
2399 PrintExpectedElements(arrayList, flag),
2400 System.SR.Sch_ComplexContentModel
2401 }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2402 }
2403 else
2404 {
2405 SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(System.SR.Sch_IncompleteContentExpecting, new string[2]
2406 {
2407 BuildElementName(context.LocalName, context.Namespace),
2408 PrintExpectedElements(arrayList, flag)
2409 }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2410 }
2411 }
static string Sch_IncompleteContentExpectingComplex
Definition SR.cs:902
static string Sch_IncompleteContentExpecting
Definition SR.cs:900
static string Sch_IncompleteContent
Definition SR.cs:890
static string Sch_IncompleteContentComplex
Definition SR.cs:892
Definition SR.cs:7
static string BuildElementName(XmlQualifiedName qname)

References System.Xml.Schema.XmlSchemaValidator.BuildElementName(), System.Xml.Schema.SchemaElementDecl.ContentValidator, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.Schema.ContentValidator.ExpectedElements(), System.Xml.Schema.ContentValidator.ExpectedParticles(), System.Xml.Schema.ValidationState.LocalName, System.Xml.Schema.ValidationState.Namespace, System.SR.Sch_IncompleteContent, System.SR.Sch_IncompleteContentComplex, System.SR.Sch_IncompleteContentExpecting, System.SR.Sch_IncompleteContentExpectingComplex, System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(), and System.Xml.Schema.ValidationState.TooComplex.

Referenced by System.Xml.Schema.XmlSchemaValidator.InternalValidateEndElement(), System.Xml.Schema.DtdValidator.ValidateEndElement(), System.Xml.Schema.XdrValidator.ValidateEndElement(), and System.Xml.Schema.XsdValidator.ValidateEndElement().