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