3 writes to
System.Private.Xml (3)
System\Xml\Schema\XmlSchemaComplexType.cs (3)
427newAttributes[i] = newAttGroupRef; 434newAttributes[i] = att.Clone(); 450newParticles[i] = CloneParticle(p, parentSchema);
212 references to
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\SchemaImporter.cs (4)
596if (items[i] is XmlSchemaElement element && element.RefName != null && 684XmlSchemaElement? element = rootSequence.Items[memberIndex] as XmlSchemaElement; 877o = attributes[i]; 1376XmlSchemaObject o = attributes[i];
System.Private.Xml (208)
System\Xml\Schema\CompiledidEntityConstraint.cs (2)
67_fields[idxField] = new Asttree(((XmlSchemaXPath)fields[idxField]).XPath!, true, nsmgr); 71e.SetSource(constraint.Fields[idxField]);
System\Xml\Schema\FacetChecker.cs (1)
899XmlSchemaFacet facet = (XmlSchemaFacet)facets[i];
System\Xml\Schema\Inference\Infer.cs (14)
452XmlSchemaImport? import = parentSchema.Includes[i] as XmlSchemaImport; 557XmlSchemaImport? import = parentSchema.Includes[i] as XmlSchemaImport; 971if (((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem].GetType() != typeof(XmlSchemaElement)) 973XmlSchemaElement subElement = (XmlSchemaElement)((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem]; 1059XmlSchemaElement? el = xsch.Items[i] as XmlSchemaElement; 1086XmlSchemaParticle? particle = xss.Items[iSeqItem] as XmlSchemaParticle; 1116particle = xss.Items[iSeqItem] as XmlSchemaParticle; 1127((XmlSchemaElement)minOccursCandidates[i]).MinOccurs = decimal.Zero; 1138((XmlSchemaElement)minOccursCandidates[i]).MinOccurs = decimal.Zero; 1177xsc.Items.Add(CreateNewElementforChoice((XmlSchemaElement)xss.Items[i])); 1286ct.Attributes.Add(scExtension.Attributes[i]); 1350XmlSchemaElement? xse = elements[i] as XmlSchemaElement; 1384XmlSchemaElement? xse = elements[i] as XmlSchemaElement; 1418XmlSchemaAttribute? attr = attributes[i] as XmlSchemaAttribute;
System\Xml\Schema\Preprocessor.cs (45)
249XmlSchemaExternal ext = (XmlSchemaExternal)schema.Includes[i]; 270XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 486XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 559XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 659external = (XmlSchemaExternal)schema.Includes[i]; 715if (!(redefine.Items[j] is XmlSchemaAnnotation)) 731SetParent(schemaItems[i], schema); 732if (schemaItems[i] is XmlSchemaAttribute attribute) 737else if (schemaItems[i] is XmlSchemaAttributeGroup attributeGroup) 742else if (schemaItems[i] is XmlSchemaComplexType complexType) 747else if (schemaItems[i] is XmlSchemaSimpleType simpleType) 752else if (schemaItems[i] is XmlSchemaElement element) 757else if (schemaItems[i] is XmlSchemaGroup group) 762else if (schemaItems[i] is XmlSchemaNotation notation) 767else if (schemaItems[i] is XmlSchemaAnnotation schemaAnnotation) 773SendValidationEvent(SR.Sch_InvalidCollection, (XmlSchemaObject)schemaItems[i]); 774removeItemsList.Add(schemaItems[i]); 841SetParent(items[i], redefine); 842XmlSchemaGroup? group = items[i] as XmlSchemaGroup; 868else if (items[i] is XmlSchemaAttributeGroup attributeGroup) 893else if (items[i] is XmlSchemaComplexType complexType) 922else if (items[i] is XmlSchemaSimpleType simpleType) 963XmlSchemaExternal external = (XmlSchemaExternal)schema.Includes[i]; 1038XmlSchemaGroupRef? groupRef = items[i] as XmlSchemaGroupRef; 1051else if (items[i] is XmlSchemaGroupBase) 1053count += CountGroupSelfReference(((XmlSchemaGroupBase)items[i]).Items, name, redefined); 1082XmlSchemaAttributeGroupRef? attrGroupRef = attributeGroup.Attributes[i] as XmlSchemaAttributeGroupRef; 1428XmlSchemaIdentityConstraint identityConstraint = (XmlSchemaIdentityConstraint)element.Constraints[i]; 1492SetParent(constraint.Fields[i], constraint); 1493ValidateIdAttribute(constraint.Fields[i]); 1554SetParent(restriction.Facets[i], restriction); 1627XmlSchemaSimpleType type = (XmlSchemaSimpleType)union1.BaseTypes[i]; 1923XmlSchemaElement element = (XmlSchemaElement)items[i]; 1945SetParent(items[i], particle); 1946XmlSchemaElement? element = items[i] as XmlSchemaElement; 1953PreprocessParticle((XmlSchemaParticle)items[i]); 1962SetParent(items[i], particle); 1963XmlSchemaElement? element = items[i] as XmlSchemaElement; 1970PreprocessParticle((XmlSchemaParticle)items[i]); 2005SetParent(attributes[i], parent); 2006XmlSchemaAttribute? attr = attributes[i] as XmlSchemaAttribute; 2013XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributes[i]; 2022PreprocessAnnotation(attributes[i]); //set parent of annotation child of attributeGroupRef 2023ValidateIdAttribute(attributes[i]); 2179annotation.Items[i].Parent = annotation; //Can be documentation or appInfo
System\Xml\Schema\SchemaCollectionCompiler.cs (40)
99XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 113object? item = rdef.Items[j]; 151object item = schema.Items[i]; 163else if ((attrgroup = schema.Items[i] as XmlSchemaAttributeGroup) != null) 167else if ((complextype = schema.Items[i] as XmlSchemaComplexType) != null) 171else if ((simpletype = schema.Items[i] as XmlSchemaSimpleType) != null) 175else if ((element = schema.Items[i] as XmlSchemaElement) != null) 179else if ((group = schema.Items[i] as XmlSchemaGroup) != null) 394((XmlSchemaIdentityConstraint)element.Constraints[i]).CompiledConstraint = null; 403XmlSchemaAttribute? attribute = attributes[i] as XmlSchemaAttribute; 428CleanupParticle((XmlSchemaParticle)particles[i]); 465substitutionGroup.Choice.Items.Add(g.Choice.Items[j]); 672XmlSchemaSimpleType st = (XmlSchemaSimpleType)mainBaseTypes[i]; 1178groupRefBase.Items.Add((XmlSchemaParticle)groupBase.Items[i]); 1196XmlSchemaParticle p = CanonicalizeParticle((XmlSchemaElement)all.Items[i], false, substitution); 1241XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)choice.Items[i], false, substitution); 1249newChoice.Items.Add(particleChoice.Items[j]); 1287XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false, substitution); 1295newSequence.Items.Add(particleSequence.Items[j]); 1446if (!IsValidRestriction((XmlSchemaParticle)derivedGroupBase.Items[i], baseAny)) 1461XmlSchemaParticle baseParticle = (XmlSchemaParticle)baseGroupBase.Items[i]; 1495XmlSchemaParticle baseParticle = (XmlSchemaParticle)baseGroupBase.Items[i]; 1496if ((count < derivedGroupBase.Items.Count) && IsValidRestriction((XmlSchemaParticle)derivedGroupBase.Items[count], baseParticle)) 1521int i = GetMappingParticle((XmlSchemaParticle)derivedSequence.Items[j], baseAll.Items); 1540if (!map[i] && !IsParticleEmptiable((XmlSchemaParticle)baseAll.Items[i])) 1558if (GetMappingParticle((XmlSchemaParticle)derivedSequence.Items[i], baseChoice.Items) < 0) 1569XmlSchemaParticle p = (XmlSchemaParticle)sequence.Items[i]; 1602if (IsValidRestriction(particle, (XmlSchemaParticle)collection[i])) 1636CalculateEffectiveTotalRange((XmlSchemaParticle)choice.Items[i], out min, out max); 1670CalculateEffectiveTotalRange((XmlSchemaParticle)collection[i], out min, out max); 1729XmlSchemaAttribute? attribute = attributeGroup.Attributes[i] as XmlSchemaAttribute; 1747XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributeGroup.Attributes[i]; 1789XmlSchemaAttribute? attribute = attributes[i] as XmlSchemaAttribute; 1815XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributes[i]; 2318XmlSchemaIdentityConstraint constraint = (XmlSchemaIdentityConstraint)constraints[i]; 2371XmlSchemaElement localElement = (XmlSchemaElement)all.Items[i]; 2448XmlSchemaElement localElement = (XmlSchemaElement)all.Items[i]; 2480DumpContentModelTo(sb, (XmlSchemaParticle)gb.Items[i]); 2530XmlSchemaParticle p = (XmlSchemaParticle)particles[i]; 2597CompileParticleElements(complexType, (XmlSchemaParticle)particles[i]);
System\Xml\Schema\SchemaCollectionpreProcessor.cs (48)
73XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 93XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 140XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 180XmlSchemaExternal subInc = (XmlSchemaExternal)include.Schema.Includes[j]; 273import = schema.Includes[i] as XmlSchemaImport; 361XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 479XmlSchemaExternal include = (XmlSchemaExternal)schema.Includes[i]; 490if (!(redefine.Items[j] is XmlSchemaAnnotation)) 537SetParent(schema.Items[i], schema); 538XmlSchemaAttribute? attribute = schema.Items[i] as XmlSchemaAttribute; 544else if (schema.Items[i] is XmlSchemaAttributeGroup attributeGroup) 549else if (schema.Items[i] is XmlSchemaComplexType complexType) 554else if (schema.Items[i] is XmlSchemaSimpleType simpleType) 559else if (schema.Items[i] is XmlSchemaElement element) 564else if (schema.Items[i] is XmlSchemaGroup group) 569else if (schema.Items[i] is XmlSchemaNotation notation) 574else if (!(schema.Items[i] is XmlSchemaAnnotation)) 576SendValidationEvent(SR.Sch_InvalidCollection, schema.Items[i]); 577removeItemsList.Add(schema.Items[i]); 592SetParent(redefine.Items[i], redefine); 593XmlSchemaGroup? group = redefine.Items[i] as XmlSchemaGroup; 615else if (redefine.Items[i] is XmlSchemaAttributeGroup attributeGroup) 636else if (redefine.Items[i] is XmlSchemaComplexType complexType) 665else if (redefine.Items[i] is XmlSchemaSimpleType simpleType) 717XmlSchemaGroupRef? groupRef = items[i] as XmlSchemaGroupRef; 729else if (items[i] is XmlSchemaGroupBase) 731count += CountGroupSelfReference(((XmlSchemaGroupBase)items[i]).Items, name); 759XmlSchemaAttributeGroupRef? groupRef = attributeGroup.Attributes[i] as XmlSchemaAttributeGroupRef; 1100SetParent(element.Constraints[i], element); 1101PreprocessIdentityConstraint((XmlSchemaIdentityConstraint)element.Constraints[i]); 1159SetParent(constraint.Fields[i], constraint); 1160ValidateIdAttribute(constraint.Fields[i]); 1221SetParent(restriction.Facets[i], restriction); 1293SetParent(union1.BaseTypes[i], union1); 1294PreprocessSimpleType((XmlSchemaSimpleType)union1.BaseTypes[i], true); 1590XmlSchemaElement element = (XmlSchemaElement)schemaAll.Items[i]; 1613SetParent(choices[i], particle); 1614XmlSchemaElement? element = choices[i] as XmlSchemaElement; 1621PreprocessParticle((XmlSchemaParticle)choices[i]); 1630SetParent(sequences[i], particle); 1631XmlSchemaElement? element = sequences[i] as XmlSchemaElement; 1638PreprocessParticle((XmlSchemaParticle)sequences[i]); 1673SetParent(attributes[i], parent); 1674XmlSchemaAttribute? attribute = attributes[i] as XmlSchemaAttribute; 1681XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributes[i]; 1690PreprocessAnnotation(attributes[i]); //set parent of annotation child of attributeGroupRef 1691ValidateIdAttribute(attributes[i]); 1788annotated.Annotation.Items[i].Parent = annotated.Annotation; //Can be documentation or appInfo
System\Xml\Schema\SchemaSetCompiler.cs (30)
399((XmlSchemaIdentityConstraint)element.Constraints[i]).CompiledConstraint = null; 409XmlSchemaAttribute? attribute = attributes[i] as XmlSchemaAttribute; 442CleanupParticle((XmlSchemaParticle)groupBase.Items[i]); 762XmlSchemaSimpleType st = (XmlSchemaSimpleType)mainBaseTypes[i]; 1323groupRefBase.Items.Add(groupBase.Items[i]); 1340XmlSchemaParticle p = CanonicalizeParticle((XmlSchemaElement)all.Items[i], false); 1374XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)choice.Items[i], false); 1382newChoice.Items.Add(p1Choice.Items[j]); 1421XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false); 1429newSequence.Items.Add(p1Sequence.Items[j]); 1730if (!IsValidRestriction((XmlSchemaParticle)derivedGroupBase.Items[i], baseAny)) 1835if (GetMappingParticle((XmlSchemaParticle)derivedChoice.Items[i], baseChoice.Items) < 0) 1858XmlSchemaParticle baseParticle = (XmlSchemaParticle)baseGroupBase.Items[i]; 1860&& IsValidRestriction((XmlSchemaParticle)derivedGroupBase.Items[count], baseParticle)) 1887int i = GetMappingParticle((XmlSchemaParticle)derivedSequence.Items[j], baseAll.Items); 1906if (!map[i] && !IsParticleEmptiable((XmlSchemaParticle)baseAll.Items[i])) 1932if (GetMappingParticle((XmlSchemaParticle)derivedSequence.Items[i], baseChoice.Items) < 0) 1952if (IsValidRestriction(particle, (XmlSchemaParticle)collection[i])) 1987CalculateEffectiveTotalRange((XmlSchemaParticle)choice.Items[i], out min, out max); 2021CalculateEffectiveTotalRange((XmlSchemaParticle)collection[i], out min, out max); 2083XmlSchemaAttribute? attr = attributeGroup.Attributes[i] as XmlSchemaAttribute; 2102XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributeGroup.Attributes[i]; 2149XmlSchemaAttribute? attr = attributes[i] as XmlSchemaAttribute; 2175XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributes[i]; 2788XmlSchemaIdentityConstraint constraint = (XmlSchemaIdentityConstraint)constraints[i]; 2840XmlSchemaElement localElement = (XmlSchemaElement)all.Items[i]; 2912Debug.Assert(!((XmlSchemaParticle)particles[i]).IsEmpty); 2925hasWildCard = BuildParticleContentModel(contentValidator, (XmlSchemaParticle)particles[i]); 2979CompileParticleElements(complexType, (XmlSchemaParticle)particles[i]); 2995CompileParticleElements((XmlSchemaParticle)particles[i]);
System\Xml\Schema\XmlSchema.cs (6)
468if ((complexType = _items[i] as XmlSchemaComplexType) != null) 472else if ((element = _items[i] as XmlSchemaElement) != null) 476else if ((group = _items[i] as XmlSchemaGroup) != null) 482newItem = _items[i].Clone(); 490XmlSchemaExternal newInclude = (XmlSchemaExternal)_includes[i].Clone(); 537XmlSchemaExternal ext = (XmlSchemaExternal)schema.Includes[i];
System\Xml\Schema\XmlSchemaComplexType.cs (5)
421xso = attributes[i]; 449XmlSchemaParticle p = (XmlSchemaParticle)groupBaseParticles[i]; 519XmlSchemaParticle p = (XmlSchemaParticle)groupBase.Items[i++]; 555if (attributes[i] is XmlSchemaAttributeGroupRef) 561XmlSchemaAttribute attribute = (attributes[i] as XmlSchemaAttribute)!;
System\Xml\Serialization\ImportContext.cs (1)
359Depends(attributes[i], refs);
System\Xml\Serialization\SchemaObjectWriter.cs (8)
133list.Add(NameOf(items[i])); 288list.Add(items[i]); 502XmlSchemaObject ai = (XmlSchemaObject)a[ia]; 656a.Add(facets[i]); 1044Write49_XmlSchemaXPath(@"field", (XmlSchemaXPath)a[ia]); 1101Write49_XmlSchemaXPath(@"field", (XmlSchemaXPath)a[ia]); 1123Write49_XmlSchemaXPath("field", (XmlSchemaXPath)a[ia]); 1174XmlSchemaObject ai = (XmlSchemaObject)a[ia];
System\Xml\Serialization\XmlSchemaImporter.cs (6)
665object item = items.Attributes[i]; 937object item = group.Items[i]; 1041object item = group.Items[i]; 1075object item = schema.Items[j]; 1577object item = group.Attributes[i]; 1757object facet = restriction.Facets[i];
System\Xml\Serialization\XmlSchemas.cs (2)
411XmlSchemaObject o = schema.Items[i]; 430destination.Items.Add(schema.Items[i]);