54 writes to MinOccurs
System.Data.Common (4)
System\Data\DataSet.cs (2)
3497any.MinOccurs = 0; 3503any.MinOccurs = 0; // when recognizing WSDL - MinOccurs="0" denotes DataSet, a MinOccurs="1" for DataTable
System\Data\DataTable.cs (2)
6693any.MinOccurs = 0; 6700any.MinOccurs = 1; // when recognizing WSDL - MinOccurs="0" denotes DataSet, a MinOccurs="1" for DataTable
System.Private.DataContractSerialization (5)
System\Runtime\Serialization\SchemaExporter.cs (5)
149element.MinOccurs = 0; 377element.MinOccurs = 0; 727any.MinOccurs = 0; 741any.MinOccurs = 0; 866iSerializableWildcardElement.MinOccurs = 0;
System.Private.Xml (45)
System\Xml\Schema\Inference\Infer.cs (15)
584xse.MinOccurs = 0; 601elementReference.MinOccurs = 0; 667ct.Particle.MinOccurs = 0; 748ct.Particle.MinOccurs = 0; 785ct.Particle.MinOccurs = decimal.Zero; 924ct.Particle.MinOccurs = 0; //previously this was simple type so subelements did not exist 933((XmlSchemaSequence)ct.Particle).MinOccurs = decimal.Zero; 974subElement.MinOccurs = 0; 1051e.MinOccurs = 0; 1127((XmlSchemaElement)minOccursCandidates[i]).MinOccurs = decimal.Zero; 1138((XmlSchemaElement)minOccursCandidates[i]).MinOccurs = decimal.Zero; 1187subElement.MinOccurs = decimal.Zero; 2410newElement.MinOccurs = copyElement.MinOccurs; 2516el.MinOccurs = 0; 2520el.MinOccurs = 1;
System\Xml\Schema\Preprocessor.cs (3)
1353element.MinOccurs = decimal.Zero; 1912particle.MinOccurs = decimal.One; 1937particle.MinOccurs = particle.MaxOccurs;
System\Xml\Schema\SchemaCollectionCompiler.cs (8)
1112choice.MinOccurs = element.MinOccurs; 1174groupRefBase.MinOccurs = groupRef.MinOccurs; 1189newAll.MinOccurs = all.MinOccurs; 1211newSequence.MinOccurs = all.MinOccurs; 1237newChoice.MinOccurs = choice.MinOccurs; 1283newSequence.MinOccurs = sequence.MinOccurs; 1442baseAny.MinOccurs = decimal.Zero; 1466baseParticle.MinOccurs *= baseGroupBase.MinOccurs;
System\Xml\Schema\SchemaCollectionpreProcessor.cs (3)
1026element.MinOccurs = decimal.Zero; 1580particle.MinOccurs = decimal.One; 1604particle.MinOccurs = particle.MaxOccurs;
System\Xml\Schema\SchemaSetCompiler.cs (9)
1247choice.MinOccurs = element.MinOccurs; 1317groupRefBase.MinOccurs = groupRef.MinOccurs; 1335newAll.MinOccurs = all.MinOccurs; 1369newChoice.MinOccurs = choice.MinOccurs; 1416newSequence.MinOccurs = sequence.MinOccurs; 1727baseAny.MinOccurs = decimal.Zero; 1790virtualSeq.MinOccurs = 1; 1802virtualChoice.MinOccurs = 1; 1814virtualAll.MinOccurs = 1;
System\Xml\Schema\XmlSchemaComplexType.cs (1)
60anyElement.MinOccurs = decimal.Zero;
System\Xml\Serialization\XmlSchemaExporter.cs (6)
158any.MinOccurs = 0; 203any.MinOccurs = 0; 659choice.MinOccurs = repeats ? 0 : 1; 806any.MinOccurs = 0; 834element.MinOccurs = minOccurs; 851refElement.MinOccurs = minOccurs;
103 references to MinOccurs
System.Data.Common (3)
System\Data\XMLSchema.cs (3)
1465table.MinOccurs = node.MinOccurs; 1623table.MinOccurs = node.MinOccurs; 2496column.AllowDBNull = FromInference || (elem.MinOccurs == 0) || elem.IsNillable;
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\SchemaImporter.cs (7)
598element.MinOccurs == 0) 634if (rootSequence.MinOccurs != 1) 862if (wildcard.MinOccurs != iSerializableWildcardElement.MinOccurs) 863ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardMinOccursMustBe, iSerializableWildcardElement.MinOccurs)); 948if (element.MinOccurs > 1) 955bool memberIsRequired = (element.MinOccurs > 0);
System.Private.Xml (93)
System\Xml\Schema\Inference\Infer.cs (4)
1111if (bItemNotUsedYet && el.MinOccurs != decimal.Zero) 2408if (copyElement.MinOccurs != decimal.One && this.Occurrence == InferenceOption.Relaxed) 2410newElement.MinOccurs = copyElement.MinOccurs; 2518else if (el.MinOccurs > 1)
System\Xml\Schema\Preprocessor.cs (5)
1044if (groupRef.MinOccurs != decimal.One || groupRef.MaxOccurs != decimal.One) 1351if (element.MinOccurs > element.MaxOccurs) 1910if (particle.MinOccurs != decimal.Zero && particle.MinOccurs != decimal.One) 1935if (particle.MinOccurs > particle.MaxOccurs)
System\Xml\Schema\SchemaCollectionCompiler.cs (38)
1059if (choice.MinOccurs != decimal.Zero) 1112choice.MinOccurs = element.MinOccurs; 1155if (groupRef.MinOccurs != decimal.One || groupRef.MaxOccurs != decimal.One) 1163if (groupRef.MinOccurs != decimal.Zero) 1174groupRefBase.MinOccurs = groupRef.MinOccurs; 1189newAll.MinOccurs = all.MinOccurs; 1211newSequence.MinOccurs = all.MinOccurs; 1216else if (!root && all.Items.Count == 1 && all.MinOccurs == decimal.One && all.MaxOccurs == decimal.One) 1237newChoice.MinOccurs = choice.MinOccurs; 1244if (p1.MinOccurs == decimal.One && p1.MaxOccurs == decimal.One && p1 is XmlSchemaChoice) 1262if (choice.MinOccurs != decimal.Zero) 1268else if (!root && choice.Items.Count == 1 && choice.MinOccurs == decimal.One && choice.MaxOccurs == decimal.One) 1283newSequence.MinOccurs = sequence.MinOccurs; 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)) 1466baseParticle.MinOccurs *= baseGroupBase.MinOccurs; 1552if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseChoice.MinOccurs, baseChoice.MaxOccurs)) 1571minOccurs += p.MinOccurs; 1577minOccurs *= sequence.MinOccurs; 1590return IsValidOccurrenceRangeRestriction(derivedParticle.MinOccurs, derivedParticle.MaxOccurs, baseParticle.MinOccurs, baseParticle.MaxOccurs); 1619minOccurs = particle.MinOccurs; 1646minOccurs *= particle.MinOccurs; 1680minOccurs *= particle.MinOccurs; 2368AllElementsContentValidator contentValidator = new AllElementsContentValidator(complexType.ContentType, all.Items.Count, all.MinOccurs == decimal.Zero); 2372if (!contentValidator.AddElement(localElement.QualifiedName, localElement, localElement.MinOccurs == decimal.Zero)) 2458if (localElement.MinOccurs == decimal.Zero) 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 (5)
722if (groupRef.MinOccurs != decimal.One || groupRef.MaxOccurs != decimal.One) 1024if (element.MinOccurs > element.MaxOccurs) 1578if (particle.MinOccurs != decimal.Zero && particle.MinOccurs != decimal.One) 1602if (particle.MinOccurs > particle.MaxOccurs)
System\Xml\Schema\SchemaSetCompiler.cs (31)
1188if (choice.MinOccurs != decimal.Zero) 1247choice.MinOccurs = element.MinOccurs; 1296if (groupRef.MinOccurs > decimal.One || groupRef.MaxOccurs != decimal.One) 1304if (groupRef.MinOccurs != decimal.Zero) 1317groupRefBase.MinOccurs = groupRef.MinOccurs; 1335newAll.MinOccurs = all.MinOccurs; 1369newChoice.MinOccurs = choice.MinOccurs; 1377if (p1.MinOccurs == decimal.One && p1.MaxOccurs == decimal.One && p1 is XmlSchemaChoice) 1395if (choice.MinOccurs != decimal.Zero) 1401else if (!root && choice.Items.Count == 1 && choice.MinOccurs == decimal.One && choice.MaxOccurs == decimal.One) 1416newSequence.MinOccurs = sequence.MinOccurs; 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)) 1917minOccurs = derivedSequence.MinOccurs * derivedSequence.Items.Count; 1926if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseChoice.MinOccurs, baseChoice.MaxOccurs)) 1940return IsValidOccurrenceRangeRestriction(derivedParticle.MinOccurs, derivedParticle.MaxOccurs, baseParticle.MinOccurs, baseParticle.MaxOccurs); 1971minOccurs = particle.MinOccurs; 1997minOccurs *= particle.MinOccurs; 2031minOccurs *= particle.MinOccurs; 2837AllElementsContentValidator contentValidator = new AllElementsContentValidator(complexType.ContentType, all.Items.Count, all.MinOccurs == decimal.Zero); 2841if (!contentValidator.AddElement(localElement.QualifiedName, localElement, localElement.MinOccurs == decimal.Zero)) 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)
1256if (e1.MinOccurs != e2.MinOccurs)
System\Xml\Serialization\SchemaObjectWriter.cs (6)
960WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); 973WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); 1135WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); 1149WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); 1165WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); 1206WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs));
System\Xml\Serialization\XmlSchemaImporter.cs (2)
298accessor.IsOptional = element.MinOccurs == 0m; 1455if (element.MinOccurs == 0 && member.TypeDesc!.IsValueType && !element.HasDefault && !member.TypeDesc.HasIsEmpty)