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

◆ CheckAttributeValue()

object System.Xml.Schema.XmlSchemaValidator.CheckAttributeValue ( object value,
SchemaAttDef attdef )
inlineprivate

Definition at line 1834 of file XmlSchemaValidator.cs.

1835 {
1836 object typedValue = null;
1837 XmlSchemaDatatype datatype = attdef.Datatype;
1838 string text = value as string;
1839 Exception ex = null;
1840 if (text != null)
1841 {
1842 ex = datatype.TryParseValue(text, _nameTable, _nsResolver, out typedValue);
1843 if (ex == null)
1844 {
1845 goto IL_0050;
1846 }
1847 }
1848 else
1849 {
1850 ex = datatype.TryParseValue(value, _nameTable, _nsResolver, out typedValue);
1851 if (ex == null)
1852 {
1853 goto IL_0050;
1854 }
1855 }
1856 _attrValid = false;
1857 if (text == null)
1858 {
1859 text = XmlSchemaDatatype.ConcatenatedToString(value);
1860 }
1862 {
1863 attdef.Name.ToString(),
1864 text,
1865 GetTypeName(attdef),
1866 ex.Message
1867 }, ex);
1868 return null;
1869 IL_0050:
1870 if (!attdef.CheckValue(typedValue))
1871 {
1872 _attrValid = false;
1874 }
1875 return typedValue;
1876 }
static string Sch_FixedAttributeValue
Definition SR.cs:492
static string Sch_AttributeValueDataTypeDetailed
Definition SR.cs:496
Definition SR.cs:7
readonly IXmlNamespaceResolver _nsResolver

References System.Xml.Schema.XmlSchemaValidator._attrValid, System.Xml.Schema.XmlSchemaValidator._nameTable, System.Xml.Schema.XmlSchemaValidator._nsResolver, System.Xml.Schema.XmlSchemaDatatype.ConcatenatedToString(), System.Xml.Dictionary, System.SR.Sch_AttributeValueDataTypeDetailed, System.SR.Sch_FixedAttributeValue, System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(), System.text, System.Xml.Schema.XmlSchemaDatatype.TryParseValue(), and System.value.

Referenced by System.Xml.Schema.XmlSchemaValidator.ValidateAttribute().