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