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

◆ CompileMinLengthFacet()

void System.Xml.Schema.FacetsChecker.FacetsCompiler.CompileMinLengthFacet ( XmlSchemaFacet facet)
inlinepackage

Definition at line 97 of file FacetsChecker.cs.

98 {
100 CheckDupFlag(facet, RestrictionFlags.MinLength, System.SR.Sch_DupMinLengthFacet);
101 _derivedRestriction.MinLength = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(_nonNegativeInt, facet, System.SR.Sch_MinLengthFacetInvalid, null, null));
102 if ((_baseFixedFlags & RestrictionFlags.MinLength) != 0 && !_datatype.IsEqual(_datatype.Restriction.MinLength, _derivedRestriction.MinLength))
103 {
104 throw new XmlSchemaException(System.SR.Sch_FacetBaseFixed, facet);
105 }
106 if ((_baseFlags & RestrictionFlags.MinLength) != 0 && _datatype.Restriction.MinLength > _derivedRestriction.MinLength)
107 {
108 throw new XmlSchemaException(System.SR.Sch_MinLengthGtBaseMinLength, facet);
109 }
110 if ((_baseFlags & RestrictionFlags.Length) != 0 && _datatype.Restriction.Length < _derivedRestriction.MinLength)
111 {
112 throw new XmlSchemaException(System.SR.Sch_MaxMinLengthBaseLength, facet);
113 }
114 SetFlag(facet, RestrictionFlags.MinLength);
115 }
static string Sch_MaxMinLengthBaseLength
Definition SR.cs:1088
static string Sch_MinLengthFacetInvalid
Definition SR.cs:656
static string Sch_FacetBaseFixed
Definition SR.cs:1114
static string Sch_DupMinLengthFacet
Definition SR.cs:612
static string Sch_MinLengthFacetProhibited
Definition SR.cs:632
static string Sch_MinLengthGtBaseMinLength
Definition SR.cs:1084
Definition SR.cs:7
override bool IsEqual(object o1, object o2)
void SetFlag(XmlSchemaFacet facet, RestrictionFlags flag)
void CheckDupFlag(XmlSchemaFacet facet, RestrictionFlags flag, string errorCode)
object ParseFacetValue(XmlSchemaDatatype datatype, XmlSchemaFacet facet, string code, IXmlNamespaceResolver nsmgr, XmlNameTable nameTable)
void CheckProhibitedFlag(XmlSchemaFacet facet, RestrictionFlags flag, string errorCode)
readonly RestrictionFacets _derivedRestriction
readonly DatatypeImplementation _datatype

References System.Xml.Schema.FacetsChecker.FacetsCompiler._baseFixedFlags, System.Xml.Schema.FacetsChecker.FacetsCompiler._baseFlags, System.Xml.Schema.FacetsChecker.FacetsCompiler._datatype, System.Xml.Schema.FacetsChecker.FacetsCompiler._derivedRestriction, System.Xml.Schema.FacetsChecker.FacetsCompiler._nonNegativeInt, System.Xml.Schema.FacetsChecker.FacetsCompiler.CheckDupFlag(), System.Xml.Schema.FacetsChecker.FacetsCompiler.CheckProhibitedFlag(), System.Xml.Schema.XmlBaseConverter.DecimalToInt32(), System.Xml.Dictionary, System.Xml.Schema.DatatypeImplementation.IsEqual(), System.Xml.Schema.RestrictionFacets.Length, System.Xml.Schema.RestrictionFacets.MinLength, System.Xml.Schema.FacetsChecker.FacetsCompiler.ParseFacetValue(), System.Xml.Schema.DatatypeImplementation.Restriction, System.SR.Sch_DupMinLengthFacet, System.SR.Sch_FacetBaseFixed, System.SR.Sch_MaxMinLengthBaseLength, System.SR.Sch_MinLengthFacetInvalid, System.SR.Sch_MinLengthFacetProhibited, System.SR.Sch_MinLengthGtBaseMinLength, and System.Xml.Schema.FacetsChecker.FacetsCompiler.SetFlag().