40 writes to MaxOccurs
System.Data.Common (5)
System\Data\DataSet.cs (1)
3506
sequence.
MaxOccurs
= decimal.MaxValue;
System\Data\DataTable.cs (1)
6694
any.
MaxOccurs
= decimal.MaxValue;
System\Data\XMLSchema.cs (3)
545
((XmlSchemaElement)el).
MaxOccurs
= pt.MaxOccurs;
911
el.
MaxOccurs
= pt.MaxOccurs;
2682
((XmlSchemaElement)choiceEl).
MaxOccurs
= ((XmlSchemaParticle)el).MaxOccurs;
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\SchemaExporter.cs (1)
728
any.
MaxOccurs
= decimal.MaxValue;
System.Private.Xml (34)
System\Xml\Schema\Inference\Infer.cs (5)
1095
el.
MaxOccurs
= decimal.MaxValue; //set it to unbounded
1104
el.
MaxOccurs
= decimal.MaxValue; //set it to unbounded
1172
xsc.
MaxOccurs
= decimal.MaxValue;
2414
newElement.
MaxOccurs
= copyElement.MaxOccurs;
2514
el.
MaxOccurs
= decimal.MaxValue; //set it to unbounded
System\Xml\Schema\Preprocessor.cs (2)
1917
particle.
MaxOccurs
= decimal.One;
1926
element.
MaxOccurs
= decimal.One;
System\Xml\Schema\SchemaCollectionCompiler.cs (8)
1113
choice.
MaxOccurs
= element.MaxOccurs;
1175
groupRefBase.
MaxOccurs
= groupRef.MaxOccurs;
1190
newAll.
MaxOccurs
= all.MaxOccurs;
1212
newSequence.
MaxOccurs
= all.MaxOccurs;
1238
newChoice.
MaxOccurs
= choice.MaxOccurs;
1284
newSequence.
MaxOccurs
= sequence.MaxOccurs;
1470
baseParticle.
MaxOccurs
= decimal.MaxValue;
1472
baseParticle.
MaxOccurs
*= baseGroupBase.MaxOccurs;
System\Xml\Schema\SchemaCollectionpreProcessor.cs (2)
1585
particle.
MaxOccurs
= decimal.One;
1593
element.
MaxOccurs
= decimal.One;
System\Xml\Schema\SchemaSetCompiler.cs (8)
1248
choice.
MaxOccurs
= element.MaxOccurs;
1318
groupRefBase.
MaxOccurs
= groupRef.MaxOccurs;
1336
newAll.
MaxOccurs
= all.MaxOccurs;
1370
newChoice.
MaxOccurs
= choice.MaxOccurs;
1417
newSequence.
MaxOccurs
= sequence.MaxOccurs;
1791
virtualSeq.
MaxOccurs
= 1;
1803
virtualChoice.
MaxOccurs
= 1;
1815
virtualAll.
MaxOccurs
= 1;
System\Xml\Schema\XmlSchemaComplexType.cs (1)
61
anyElement.
MaxOccurs
= decimal.MaxValue;
System\Xml\Serialization\XmlSchemaExporter.cs (8)
159
any.
MaxOccurs
= decimal.MaxValue;
205
any.
MaxOccurs
= decimal.MaxValue;
426
any.
MaxOccurs
= decimal.MaxValue;
447
any.
MaxOccurs
= decimal.MaxValue;
658
choice.
MaxOccurs
= repeats ? decimal.MaxValue : 1;
807
any.
MaxOccurs
= repeats ? decimal.MaxValue : 1;
835
element.
MaxOccurs
= maxOccurs;
852
refElement.
MaxOccurs
= maxOccurs;
116 references to MaxOccurs
System.Data.Common (14)
System\Data\XMLSchema.cs (14)
544
if (isChoice && pt.
MaxOccurs
> decimal.One && (((XmlSchemaElement)el).SchemaType is XmlSchemaComplexType)) // we know frominference condition
545
((XmlSchemaElement)el).MaxOccurs = pt.
MaxOccurs
;
549
if (!FromInference || (((XmlSchemaElement)el).
MaxOccurs
!= decimal.One && !(((XmlSchemaElement)el).SchemaType is XmlSchemaComplexType)))
910
if (FromInference && pt is XmlSchemaChoice && pt.
MaxOccurs
> decimal.One && (el.SchemaType is XmlSchemaComplexType))
911
el.MaxOccurs = pt.
MaxOccurs
;
1466
table.MaxOccurs = node.
MaxOccurs
;
1624
table.MaxOccurs = node.
MaxOccurs
;
2655
if ((((XmlSchemaElement)el).
MaxOccurs
!= decimal.One) && (!isComplexTypeOrValidElementType))
2681
if (((XmlSchemaParticle)el).
MaxOccurs
> decimal.One && (((XmlSchemaElement)choiceEl).SchemaType is XmlSchemaComplexType)) // amir
2682
((XmlSchemaElement)choiceEl).MaxOccurs = ((XmlSchemaParticle)el).
MaxOccurs
;
2683
if ((((XmlSchemaElement)choiceEl).RefName.Name.Length != 0) && (!FromInference && ((XmlSchemaElement)choiceEl).
MaxOccurs
!= decimal.One && !(((XmlSchemaElement)choiceEl).SchemaType is XmlSchemaComplexType)))
2809
if (node.
MaxOccurs
== decimal.Zero)
2827
if ((node.
MaxOccurs
> decimal.One) && typeNode == null)
2858
if ((node.
MaxOccurs
> decimal.One) && typeNode == null)
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\SchemaImporter.cs (4)
574
return (localElement.MaxOccursString == Globals.OccursUnbounded || localElement.
MaxOccurs
> 1);
636
if (rootSequence.
MaxOccurs
!= 1)
792
if (any.
MaxOccurs
!= decimal.MaxValue)
950
if (element.
MaxOccurs
!= 1)
System.Private.Xml (98)
System\Xml\Schema\Inference\Infer.cs (3)
2412
if (copyElement.
MaxOccurs
!= decimal.One)
2414
newElement.MaxOccurs = copyElement.
MaxOccurs
;
2512
if (setMaxOccurs || el.
MaxOccurs
> 1)
System\Xml\Schema\Preprocessor.cs (7)
1044
if (groupRef.MinOccurs != decimal.One || groupRef.
MaxOccurs
!= decimal.One)
1351
if (element.MinOccurs > element.
MaxOccurs
)
1915
if (particle.
MaxOccurs
!= decimal.One)
1924
if (element.
MaxOccurs
!= decimal.Zero && element.
MaxOccurs
!= decimal.One)
1935
if (particle.MinOccurs > particle.
MaxOccurs
)
1937
particle.MinOccurs = particle.
MaxOccurs
;
System\Xml\Schema\SchemaCollectionCompiler.cs (38)
1113
choice.MaxOccurs = element.
MaxOccurs
;
1155
if (groupRef.MinOccurs != decimal.One || groupRef.
MaxOccurs
!= decimal.One)
1175
groupRefBase.MaxOccurs = groupRef.
MaxOccurs
;
1190
newAll.MaxOccurs = all.
MaxOccurs
;
1212
newSequence.MaxOccurs = all.
MaxOccurs
;
1216
else if (!root && all.Items.Count == 1 && all.MinOccurs == decimal.One && all.
MaxOccurs
== decimal.One)
1238
newChoice.MaxOccurs = choice.
MaxOccurs
;
1244
if (p1.MinOccurs == decimal.One && p1.
MaxOccurs
== decimal.One && p1 is XmlSchemaChoice)
1268
else if (!root && choice.Items.Count == 1 && choice.MinOccurs == decimal.One && choice.
MaxOccurs
== decimal.One)
1284
newSequence.MaxOccurs = sequence.
MaxOccurs
;
1290
if (p1.MinOccurs == decimal.One && p1.
MaxOccurs
== decimal.One && p1 is XmlSchemaSequence)
1310
else if (!root && sequence.Items.Count == 1 && sequence.MinOccurs == decimal.One && sequence.
MaxOccurs
== decimal.One)
1436
if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseAny.MinOccurs, baseAny.
MaxOccurs
))
1467
if (baseParticle.
MaxOccurs
!= decimal.MaxValue)
1469
if (baseGroupBase.
MaxOccurs
== decimal.MaxValue)
1472
baseParticle.MaxOccurs *= baseGroupBase.
MaxOccurs
;
1552
if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseChoice.MinOccurs, baseChoice.
MaxOccurs
))
1572
if (p.
MaxOccurs
== decimal.MaxValue)
1575
maxOccurs += p.
MaxOccurs
;
1578
if (sequence.
MaxOccurs
== decimal.MaxValue)
1584
maxOccurs *= sequence.
MaxOccurs
;
1590
return IsValidOccurrenceRangeRestriction(derivedParticle.MinOccurs, derivedParticle.
MaxOccurs
, baseParticle.MinOccurs, baseParticle.
MaxOccurs
);
1620
maxOccurs = particle.
MaxOccurs
;
1649
if (particle.
MaxOccurs
== decimal.MaxValue)
1652
maxOccurs *= particle.
MaxOccurs
;
1683
if (particle.
MaxOccurs
== decimal.MaxValue)
1686
maxOccurs *= particle.
MaxOccurs
;
2489
if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.One)
2493
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.One)
2497
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.MaxValue)
2501
else if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.MaxValue)
2507
sb.Append($"{{{particle.MinOccurs.ToString(NumberFormatInfo.InvariantInfo)}, {particle.
MaxOccurs
.ToString(NumberFormatInfo.InvariantInfo)}}}");
2552
if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.One)
2556
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.One)
2560
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.MaxValue)
2564
else if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.MaxValue)
2570
contentValidator.AddLeafRange(particle.MinOccurs, particle.
MaxOccurs
);
System\Xml\Schema\SchemaCollectionpreProcessor.cs (7)
722
if (groupRef.MinOccurs != decimal.One || groupRef.
MaxOccurs
!= decimal.One)
1024
if (element.MinOccurs > element.
MaxOccurs
)
1583
if (particle.
MaxOccurs
!= decimal.One)
1591
if (element.
MaxOccurs
!= decimal.Zero && element.
MaxOccurs
!= decimal.One)
1602
if (particle.MinOccurs > particle.
MaxOccurs
)
1604
particle.MinOccurs = particle.
MaxOccurs
;
System\Xml\Schema\SchemaSetCompiler.cs (29)
1248
choice.MaxOccurs = element.
MaxOccurs
;
1296
if (groupRef.MinOccurs > decimal.One || groupRef.
MaxOccurs
!= decimal.One)
1318
groupRefBase.MaxOccurs = groupRef.
MaxOccurs
;
1336
newAll.MaxOccurs = all.
MaxOccurs
;
1370
newChoice.MaxOccurs = choice.
MaxOccurs
;
1377
if (p1.MinOccurs == decimal.One && p1.
MaxOccurs
== decimal.One && p1 is XmlSchemaChoice)
1401
else if (!root && choice.Items.Count == 1 && choice.MinOccurs == decimal.One && choice.
MaxOccurs
== decimal.One)
1417
newSequence.MaxOccurs = sequence.
MaxOccurs
;
1425
if (p1.MinOccurs == decimal.One && p1.
MaxOccurs
== decimal.One && p1Sequence != null)
1444
else if (!root && sequence.Items.Count == 1 && sequence.MinOccurs == decimal.One && sequence.
MaxOccurs
== decimal.One)
1473
if (xss.MinOccurs == one && xss.
MaxOccurs
== one)
1486
if (xsc.MinOccurs == one && xsc.
MaxOccurs
== one)
1503
if (xsa.MinOccurs == one && xsa.
MaxOccurs
== one)
1720
if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseAny.MinOccurs, baseAny.
MaxOccurs
))
1918
if (derivedSequence.
MaxOccurs
== decimal.MaxValue)
1924
maxOccurs = derivedSequence.
MaxOccurs
* derivedSequence.Items.Count;
1926
if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseChoice.MinOccurs, baseChoice.
MaxOccurs
))
1940
return IsValidOccurrenceRangeRestriction(derivedParticle.MinOccurs, derivedParticle.
MaxOccurs
, baseParticle.MinOccurs, baseParticle.
MaxOccurs
);
1972
maxOccurs = particle.
MaxOccurs
;
2000
if (particle.
MaxOccurs
== decimal.MaxValue)
2003
maxOccurs *= particle.
MaxOccurs
;
2034
if (particle.
MaxOccurs
== decimal.MaxValue)
2037
maxOccurs *= particle.
MaxOccurs
;
2933
if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.One)
2937
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.One)
2941
else if (particle.MinOccurs == decimal.Zero && particle.
MaxOccurs
== decimal.MaxValue)
2945
else if (particle.MinOccurs == decimal.One && particle.
MaxOccurs
== decimal.MaxValue)
2951
contentValidator.AddLeafRange(particle.MinOccurs, particle.
MaxOccurs
);
System\Xml\Serialization\Mappings.cs (2)
1258
if (e1.
MaxOccurs
!= e2.
MaxOccurs
)
System\Xml\Serialization\SchemaObjectWriter.cs (12)
961
WriteAttribute("maxOccurs", "", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));
974
WriteAttribute("maxOccurs", "", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));
1136
WriteAttribute(@"maxOccurs", @"", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));
1150
WriteAttribute(@"maxOccurs", @"", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));
1166
WriteAttribute("maxOccurs", "", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));
1207
WriteAttribute(@"maxOccurs", @"", o.
MaxOccurs
== decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.
MaxOccurs
));