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

◆ MaxOccursString

string? System.Xml.Schema.XmlSchemaParticle.MaxOccursString
getsetinherited

Definition at line 57 of file XmlSchemaParticle.cs.

58 {
59 get
60 {
61 if ((_flags & Occurs.Max) != 0)
62 {
63 if (!(_maxOccurs == decimal.MaxValue))
64 {
65 return XmlConvert.ToString(_maxOccurs);
66 }
67 return "unbounded";
68 }
69 return null;
70 }
71 set
72 {
73 if (value == null)
74 {
75 _maxOccurs = 1m;
76 _flags &= ~Occurs.Max;
77 return;
78 }
79 if (value == "unbounded")
80 {
81 _maxOccurs = decimal.MaxValue;
82 }
83 else
84 {
85 _maxOccurs = XmlConvert.ToInteger(value);
86 if (_maxOccurs < 0m)
87 {
88 throw new XmlSchemaException(System.SR.Sch_MaxOccursInvalidXsd, string.Empty);
89 }
90 if (_maxOccurs == 0m && (_flags & Occurs.Min) == 0)
91 {
92 _minOccurs = default(decimal);
93 }
94 }
95 _flags |= Occurs.Max;
96 }
97 }
static string Sch_MaxOccursInvalidXsd
Definition SR.cs:752
Definition SR.cs:7

Referenced by System.Xml.Schema.Preprocessor.PreprocessElement(), and System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessElement().