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

◆ CheckValue()

void System.Xml.Schema.XsdValidator.CheckValue ( string value,
SchemaAttDef attdef )
inlineprivate

Definition at line 657 of file XsdValidator.cs.

658 {
659 try
660 {
662 bool flag = attdef != null;
663 XmlSchemaDatatype xmlSchemaDatatype = (flag ? attdef.Datatype : context.ElementDecl.Datatype);
664 if (xmlSchemaDatatype == null)
665 {
666 return;
667 }
668 object obj = xmlSchemaDatatype.ParseValue(value, base.NameTable, _nsManager, createAtomicValue: true);
671 {
672 if (xmlSchemaDatatype.Variety == XmlSchemaDatatypeVariety.List)
673 {
674 string[] array = (string[])obj;
675 for (int i = 0; i < array.Length; i++)
676 {
678 }
679 }
680 else
681 {
682 ProcessTokenizedType(xmlSchemaDatatype.TokenizedType, (string)obj);
683 }
684 }
685 SchemaDeclBase schemaDeclBase = (flag ? ((SchemaDeclBase)attdef) : ((SchemaDeclBase)context.ElementDecl));
686 if (!schemaDeclBase.CheckValue(obj))
687 {
688 if (flag)
689 {
691 }
692 else
693 {
695 }
696 }
697 if (xmlSchemaDatatype.Variety == XmlSchemaDatatypeVariety.Union)
698 {
700 }
702 }
703 catch (XmlSchemaException)
704 {
705 if (attdef != null)
706 {
708 }
709 else
710 {
712 }
713 }
714 }
static string Sch_AttributeValueDataType
Definition SR.cs:1808
static string Sch_ElementValueDataType
Definition SR.cs:1810
static string Sch_FixedElementValue
Definition SR.cs:494
static string Sch_FixedAttributeValue
Definition SR.cs:492
Definition SR.cs:7
void SendValidationEvent(string code)
object UnWrapUnion(object typedValue)
void ProcessTokenizedType(XmlTokenizedType ttype, string name)
XmlNamespaceManager _nsManager

References System.Xml.Schema.XsdValidator._nsManager, System.array, System.Xml.Schema.BaseValidator.context, System.Xml.Schema.SchemaDeclBase.Datatype, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.Schema.ValidationState.LocalName, System.Xml.Schema.ValidationState.Namespace, System.obj, System.Xml.Schema.XmlSchemaDatatype.ParseValue(), System.Xml.Schema.XsdValidator.ProcessTokenizedType(), System.Xml.Schema.XmlSchemaValidator.QNameString(), System.SR.Sch_AttributeValueDataType, System.SR.Sch_ElementValueDataType, System.SR.Sch_FixedAttributeValue, System.SR.Sch_FixedElementValue, System.Xml.Schema.BaseValidator.SendValidationEvent(), System.Xml.Schema.XsdValidator.UnWrapUnion(), and System.value.

Referenced by System.Xml.Schema.XsdValidator.ValidateEndElement(), and System.Xml.Schema.XsdValidator.ValidateStartElement().