19 instantiations of XmlSchemaElement
System.Private.DataContractSerialization (6)
System\Runtime\Serialization\SchemaExporter.cs (5)
109
XmlSchemaElement topLevelElement = new
XmlSchemaElement
();
133
XmlSchemaElement element = new
XmlSchemaElement
();
375
XmlSchemaElement element = new
XmlSchemaElement
();
386
XmlSchemaElement keyValueElement = new
XmlSchemaElement
();
778
XmlSchemaElement schemaRefElement = new
XmlSchemaElement
();
System\Runtime\Serialization\SchemaImporter.cs (1)
142
XmlSchemaElement element = new
XmlSchemaElement
();
System.Private.Xml (13)
System\Xml\Schema\Inference\Infer.cs (5)
511
xse = new
XmlSchemaElement
();
529
xse = new
XmlSchemaElement
();
541
xse = new
XmlSchemaElement
();
597
XmlSchemaElement elementReference = new
XmlSchemaElement
();
2385
XmlSchemaElement newElement = new
XmlSchemaElement
();
System\Xml\Schema\XsdBuilder.cs (1)
1316
builder._xso = builder._element = new
XmlSchemaElement
();
System\Xml\Serialization\XmlSchemaExporter.cs (4)
239
element = new
XmlSchemaElement
();
524
XmlSchemaElement schemaElement = new
XmlSchemaElement
();
820
element = new
XmlSchemaElement
();
849
XmlSchemaElement refElement = new
XmlSchemaElement
();
System\Xml\Serialization\XmlSchemaImporter.cs (2)
156
XmlSchemaElement element = new
XmlSchemaElement
();
231
XmlSchemaElement element = new
XmlSchemaElement
();
System\Xml\Serialization\XmlSchemas.cs (1)
738
XmlSchemaElement element = new
XmlSchemaElement
();
444 references to XmlSchemaElement
netstandard (1)
netstandard.cs (1)
2323
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlSchemaElement
))]
System.Data.Common (52)
System\Data\XMLSchema.cs (52)
134
private
XmlSchemaElement
? _dsElement;
189
if (item is
XmlSchemaElement
elem)
413
internal void HandleRefTableProperties(
XmlSchemaElement
element)
541
if (el is
XmlSchemaElement
)
544
if (isChoice && pt.MaxOccurs > decimal.One && (((
XmlSchemaElement
)el).SchemaType is XmlSchemaComplexType)) // we know frominference condition
545
((
XmlSchemaElement
)el).MaxOccurs = pt.MaxOccurs;
547
if (((
XmlSchemaElement
)el).RefName.Name.Length != 0)
549
if (!FromInference || (((
XmlSchemaElement
)el).MaxOccurs != decimal.One && !(((
XmlSchemaElement
)el).SchemaType is XmlSchemaComplexType)))
554
if (!IsTable((
XmlSchemaElement
)el))
573
foreach (
XmlSchemaElement
XmlElement in elements)
583
private
XmlSchemaElement
? FindDatasetElement(XmlSchemaObjectCollection elements)
585
foreach (
XmlSchemaElement
XmlElement in elements)
592
XmlSchemaElement
node = (
XmlSchemaElement
)elements[0];
755
XmlSchemaElement
? sel = el as
XmlSchemaElement
;
769
foreach (
XmlSchemaElement
element in _elements)
835
ds.DataSetName = XmlConvert.DecodeName(((
XmlSchemaElement
)_elements[0]).Name)!;
884
if (pt is
XmlSchemaElement
)
907
XmlSchemaElement
? el = item as
XmlSchemaElement
;
1442
internal DataTable InstantiateSimpleTable(
XmlSchemaElement
node)
1537
Debug.Assert((node is
XmlSchemaElement
) || (node is XmlSchemaAttribute), "GetInstanceName should only be called on attribute or elements");
1539
if (node is
XmlSchemaElement
el)
1556
internal DataTable InstantiateTable(
XmlSchemaElement
node, XmlSchemaComplexType typeNode, bool isRef)
1929
XmlSchemaElement
? el = node as
XmlSchemaElement
;
1950
typeNode = (XmlSchemaAnnotated?)_schemaTypes![isAttr ? ((XmlSchemaAttribute)node).SchemaTypeName : ((
XmlSchemaElement
)node).SchemaTypeName];
2242
else if (typeNode is
XmlSchemaElement
)
2244
strType = ((
XmlSchemaElement
)typeNode).SchemaTypeName.Name;
2360
internal void HandleElementColumn(
XmlSchemaElement
elem, DataTable table, bool isBase)
2363
XmlSchemaElement
? el = elem.Name != null ? elem : (
XmlSchemaElement
?)_elementsTable![elem.RefName];
2418
else if (typeNode is
XmlSchemaElement
)
2420
strType = ((
XmlSchemaElement
)typeNode).SchemaTypeName.Name;
2562
internal void HandleDataSet(
XmlSchemaElement
node, bool isNewDataSet)
2634
if (el is
XmlSchemaElement
)
2636
if (((
XmlSchemaElement
)el).RefName.Name.Length != 0)
2644
DataTable? tempTable = _ds.Tables.GetTable(XmlConvert.DecodeName(GetInstanceName((
XmlSchemaElement
)el)), node.QualifiedName.Namespace);
2650
if (node.ElementSchemaType != null || !(((
XmlSchemaElement
)el).SchemaType is XmlSchemaComplexType))
2655
if ((((
XmlSchemaElement
)el).MaxOccurs != decimal.One) && (!isComplexTypeOrValidElementType))
2662
DataTable? child = HandleTable((
XmlSchemaElement
)el);
2679
if (choiceEl is
XmlSchemaElement
)
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)))
2686
DataTable child = HandleTable((
XmlSchemaElement
)choiceEl)!;
2807
internal bool IsTable(
XmlSchemaElement
node)
2851
internal DataTable? HandleTable(
XmlSchemaElement
node)
System.Private.DataContractSerialization (38)
System\Runtime\Serialization\DataContractSet.cs (1)
659
public List<XmlQualifiedName> ImportSchemaSet(XmlSchemaSet schemaSet, IEnumerable<
XmlSchemaElement
> elements, bool importXmlDataType)
System\Runtime\Serialization\SchemaExporter.cs (10)
104
private
XmlSchemaElement
ExportTopLevelElement(DataContract dataContract, XmlSchema? schema)
109
XmlSchemaElement
topLevelElement = new XmlSchemaElement();
133
XmlSchemaElement
element = new XmlSchemaElement();
184
private static void SetElementType(
XmlSchemaElement
element, DataContract dataContract, XmlSchema schema)
375
XmlSchemaElement
element = new XmlSchemaElement();
386
XmlSchemaElement
keyValueElement = new XmlSchemaElement();
528
XmlSchemaElement
topLevelElement = ExportTopLevelElement(dataContract, schema);
567
if (item is
XmlSchemaElement
)
570
qname = new XmlQualifiedName(((
XmlSchemaElement
)item).Name, schema.TargetNamespace);
778
XmlSchemaElement
schemaRefElement = new XmlSchemaElement();
System\Runtime\Serialization\SchemaHelper.cs (9)
16
internal
XmlSchemaElement
? _element;
20
internal SchemaObjectInfo(XmlSchemaType? type,
XmlSchemaElement
? element, XmlSchema? schema, List<XmlSchemaType>? knownTypes)
83
internal static
XmlSchemaElement
? GetSchemaElement(SchemaObjectDictionary schemaInfo, XmlQualifiedName elementName)
93
internal static
XmlSchemaElement
? GetSchemaElement(XmlSchemaSet schemas, XmlQualifiedName elementQName, out XmlSchema? outSchema)
105
if (schemaObj is
XmlSchemaElement
schemaElement && schemaElement.Name == elementQName.Name)
146
internal static void AddElementForm(
XmlSchemaElement
element, XmlSchema schema)
194
internal static XmlSchema? GetSchemaWithGlobalElementDeclaration(
XmlSchemaElement
element, XmlSchemaSet schemas)
201
if (schemaObject is
XmlSchemaElement
schemaElement && schemaElement == element)
218
if (schemaObject is
XmlSchemaElement
schemaElement && schemaElement.SchemaTypeName.Equals(typeQName))
System\Runtime\Serialization\SchemaImporter.cs (18)
27
private readonly IEnumerable<
XmlSchemaElement
>? _elements;
35
internal SchemaImporter(XmlSchemaSet schemas, IEnumerable<XmlQualifiedName>? typeNames, IEnumerable<
XmlSchemaElement
>? elements, DataContractSet dataContractSet, bool importXmlDataType)
85
foreach (
XmlSchemaElement
element in schema.Elements.Values)
105
foreach (
XmlSchemaElement
element in _elements)
142
XmlSchemaElement
element = new XmlSchemaElement();
289
if (schemaObj is
XmlSchemaElement
schemaElement)
350
private DataContract ImportAnonymousGlobalElement(
XmlSchemaElement
element, XmlQualifiedName typeQName, string? ns)
363
private DataContract ImportAnonymousElement(
XmlSchemaElement
element, XmlQualifiedName typeQName)
573
if (o is
XmlSchemaElement
localElement)
596
if (items[i] is
XmlSchemaElement
element && element.RefName != null &&
606
if (schemaObject is
XmlSchemaElement
schemaElement)
684
XmlSchemaElement
? element = rootSequence.Items[memberIndex] as
XmlSchemaElement
;
922
XmlSchemaElement
? topLevelElement = SchemaHelper.GetSchemaElement(SchemaObjects, typeName);
944
private void ImportClassMember(
XmlSchemaElement
element, ClassDataContract dataContract)
1058
XmlSchemaElement
element = (
XmlSchemaElement
)rootSequence.Items[0];
1353
private static void CheckIfElementUsesUnsupportedConstructs(XmlQualifiedName typeName,
XmlSchemaElement
element)
System.Private.Xml (334)
System\Xml\Core\XmlAsyncCheckReader.cs (1)
1059
XmlSchemaElement
? IXmlSchemaInfo.SchemaElement
System\Xml\Core\XsdValidatingReader.cs (2)
1852
XmlSchemaElement
? IXmlSchemaInfo.SchemaElement
2782
XmlSchemaElement
? schemaElem = _xmlSchemaInfo.SchemaElement;
System\Xml\Dom\DocumentSchemaValidator.cs (3)
103
XmlSchemaElement
? schemaElement = schemaInfo.SchemaElement;
656
XmlSchemaElement
? schemaElement = schemaObject as
XmlSchemaElement
;
System\Xml\Dom\XmlName.cs (4)
155
public virtual
XmlSchemaElement
? SchemaElement
254
public override
XmlSchemaElement
? SchemaElement
258
return _decl as
XmlSchemaElement
;
295
&& (object?)schemaInfo.SchemaElement == (object?)(_decl as
XmlSchemaElement
)
System\Xml\Schema\BaseProcessor.cs (1)
146
Debug.Assert(item is
XmlSchemaElement
);
System\Xml\Schema\ContentValidator.cs (5)
1019
XmlSchemaElement
? elem = p as
XmlSchemaElement
;
1029
XmlSchemaElement
member = (
XmlSchemaElement
)grp.Members[i]!;
1900
if (matched && _positions[pos].particle is
XmlSchemaElement
)
System\Xml\Schema\Inference\Infer.cs (40)
197
XmlSchemaElement
? xse = null;
198
foreach (
XmlSchemaElement
? elem in schemas.GlobalElements.Values)
492
private
XmlSchemaElement
AddElement(string localName, string prefix, string? childURI, XmlSchema? parentSchema, XmlSchemaObjectCollection? addLocation, int positionWithinCollection)
499
XmlSchemaElement
? xse;
500
XmlSchemaElement
? returnedElement; //this value will change to elementReference if childURI!= parentURI
597
XmlSchemaElement
elementReference = new XmlSchemaElement();
632
internal void InferElement(
XmlSchemaElement
xse, bool bCreatingNewType, XmlSchema parentSchema)
971
if (((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem].GetType() != typeof(
XmlSchemaElement
))
973
XmlSchemaElement
subElement = (
XmlSchemaElement
)((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem];
994
private XmlSchemaType? GetEffectiveSchemaType(
XmlSchemaElement
elem, bool bCreatingNewType)
1029
internal
XmlSchemaElement
FindMatchingElement(bool bCreatingNewType, XmlReader xtr, XmlSchemaComplexType ct, ref int lastUsedSeqItem, XmlSchema? parentSchema, bool setMaxoccurs)
1050
XmlSchemaElement
e = AddElement(xtr.LocalName, xtr.Prefix, xtr.NamespaceURI, parentSchema, xss.Items, -1);
1059
XmlSchemaElement
? el = xsch.Items[i] as
XmlSchemaElement
;
1072
XmlSchemaElement
referencedElement = FindGlobalElement(childURI, xtr.LocalName, out parentSchema)!;
1078
XmlSchemaElement
subElement = AddElement(xtr.LocalName, xtr.Prefix, xtr.NamespaceURI, parentSchema, xsch.Items, -1);
1087
XmlSchemaElement
? el = particle as
XmlSchemaElement
;
1106
XmlSchemaElement
referencedElement = FindGlobalElement(childURI, xtr.LocalName, out parentSchema)!;
1117
el = particle as
XmlSchemaElement
;
1127
((
XmlSchemaElement
)minOccursCandidates[i]).MinOccurs = decimal.Zero;
1138
((
XmlSchemaElement
)minOccursCandidates[i]).MinOccurs = decimal.Zero;
1140
XmlSchemaElement
referencedElement = FindGlobalElement(childURI, xtr.LocalName, out parentSchema)!;
1152
XmlSchemaElement
? subElement;
1153
XmlSchemaElement
? actualElement = null;
1177
xsc.Items.Add(CreateNewElementforChoice((
XmlSchemaElement
)xss.Items[i]));
1197
internal void ProcessAttributes(ref
XmlSchemaElement
xse, XmlSchemaType? effectiveSchemaType, bool bCreatingNewType, XmlSchema parentSchema)
1328
internal
XmlSchemaElement
? FindGlobalElement(string? namespaceURI, string localName, out XmlSchema? parentSchema)
1331
XmlSchemaElement
? xse;
1346
internal static
XmlSchemaElement
? FindElement(XmlSchemaObjectCollection elements, string elementName)
1350
XmlSchemaElement
? xse = elements[i] as
XmlSchemaElement
;
1380
internal static
XmlSchemaElement
? FindElementRef(XmlSchemaObjectCollection elements, string elementName, string nsURI)
1384
XmlSchemaElement
? xse = elements[i] as
XmlSchemaElement
;
2383
private
XmlSchemaElement
CreateNewElementforChoice(
XmlSchemaElement
copyElement)
2385
XmlSchemaElement
newElement = new XmlSchemaElement();
2508
internal void SetMinMaxOccurs(
XmlSchemaElement
el, bool setMaxOccurs)
System\Xml\Schema\IXmlSchemaInfo.cs (1)
21
XmlSchemaElement
? SchemaElement { get; }
System\Xml\Schema\Preprocessor.cs (11)
752
else if (schemaItems[i] is
XmlSchemaElement
element)
786
foreach (
XmlSchemaElement
? element in includedSchema.Elements.Values)
1259
private void PreprocessElement(
XmlSchemaElement
element)
1314
private void PreprocessLocalElement(
XmlSchemaElement
element)
1371
private void PreprocessElementContent(
XmlSchemaElement
element)
1923
XmlSchemaElement
element = (
XmlSchemaElement
)items[i];
1946
XmlSchemaElement
? element = items[i] as
XmlSchemaElement
;
1963
XmlSchemaElement
? element = items[i] as
XmlSchemaElement
;
System\Xml\Schema\SchemaCollectionCompiler.cs (65)
41
foreach (
XmlSchemaElement
? element in _schema!.Elements.Values)
84
foreach (
XmlSchemaElement
? element in _schema.Elements.Values)
118
XmlSchemaElement
? element;
137
else if ((element = item as
XmlSchemaElement
) != null)
156
XmlSchemaElement
? element;
175
else if ((element = schema.Items[i] as
XmlSchemaElement
) != null)
225
foreach (
XmlSchemaElement
? element in _schema.Elements.Values)
263
foreach (
XmlSchemaElement
? element in _schema.Elements.Values)
281
foreach (
XmlSchemaElement
? element in _schema!.Elements.Values)
378
private static void CleanupElement(
XmlSchemaElement
element)
419
if (particle is
XmlSchemaElement
)
421
CleanupElement((
XmlSchemaElement
)particle);
437
SendValidationEvent(SR.Sch_SubstitutionCircularRef, (
XmlSchemaElement
)substitutionGroup.Members[0]!);
441
XmlSchemaElement
? examplar = (
XmlSchemaElement
?)_schema!.Elements[substitutionGroup.Examplar];
457
XmlSchemaElement
element = (
XmlSchemaElement
)substitutionGroup.Members[i]!;
478
SendValidationEvent(SR.Sch_NoExamplar, (
XmlSchemaElement
)substitutionGroup.Members[0]!);
485
XmlSchemaElement
? examplar = (
XmlSchemaElement
?)_schema!.Elements[substitutionGroup.Examplar];
490
XmlSchemaElement
? element = (
XmlSchemaElement
?)substitutionGroup.Members[i];
1074
else if (particle is
XmlSchemaElement
)
1076
return CanonicalizeElement((
XmlSchemaElement
)particle, substitution);
1100
private XmlSchemaParticle CanonicalizeElement(
XmlSchemaElement
element, bool substitution)
1196
XmlSchemaParticle p = CanonicalizeParticle((
XmlSchemaElement
)all.Items[i], false, substitution);
1334
if (baseParticle is
XmlSchemaElement
)
1336
if (derivedParticle is
XmlSchemaElement
)
1338
return IsElementFromElement((
XmlSchemaElement
)derivedParticle, (
XmlSchemaElement
)baseParticle);
1347
if (derivedParticle is
XmlSchemaElement
)
1349
return IsElementFromAny((
XmlSchemaElement
)derivedParticle, (XmlSchemaAny)baseParticle);
1362
if (derivedParticle is
XmlSchemaElement
)
1364
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle, true);
1377
if (derivedParticle is
XmlSchemaElement
)
1379
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle, false);
1392
if (derivedParticle is
XmlSchemaElement
)
1394
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle, true);
1409
private static bool IsElementFromElement(
XmlSchemaElement
derivedElement,
XmlSchemaElement
baseElement)
1420
private static bool IsElementFromAny(
XmlSchemaElement
derivedElement, XmlSchemaAny baseAny)
1456
private bool IsElementFromGroupBase(
XmlSchemaElement
derivedElement, XmlSchemaGroupBase baseGroupBase, bool skipEmptableOnly)
1617
if (particle is
XmlSchemaElement
|| particle is XmlSchemaAny)
2177
private void CompileElement(
XmlSchemaElement
xe)
2194
XmlSchemaElement
? e = (
XmlSchemaElement
?)_schema!.Elements[xe.RefName];
2223
XmlSchemaElement
? examplar = (
XmlSchemaElement
?)_schema!.Elements[xe.SubstitutionGroup];
2371
XmlSchemaElement
localElement = (
XmlSchemaElement
)all.Items[i];
2390
if (e.Particle1 is
XmlSchemaElement
)
2392
if (e.Particle2 is
XmlSchemaElement
)
2394
SendValidationEvent(SR.Sch_NonDeterministic, ((
XmlSchemaElement
)e.Particle1).QualifiedName.ToString(), (
XmlSchemaElement
)e.Particle2);
2398
SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle2!).NamespaceList!.ToString(), ((
XmlSchemaElement
)e.Particle1).QualifiedName.ToString(), (XmlSchemaAny)e.Particle2);
2403
if (e.Particle2 is
XmlSchemaElement
)
2405
SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle1!).NamespaceList!.ToString(), ((
XmlSchemaElement
)e.Particle2).QualifiedName.ToString(), (XmlSchemaAny)e.Particle1);
2432
if (particle is
XmlSchemaElement
)
2434
sb.Append(((
XmlSchemaElement
)particle).QualifiedName);
2448
XmlSchemaElement
localElement = (
XmlSchemaElement
)all.Items[i];
2514
if (particle is
XmlSchemaElement
element)
2576
if (particle is
XmlSchemaElement
localElement)
2585
XmlSchemaElement
element = (
XmlSchemaElement
)complexType.LocalElements[localElement.QualifiedName]!;
System\Xml\Schema\SchemaCollectionpreProcessor.cs (11)
501
foreach (
XmlSchemaElement
? element in includedSchema.Elements.Values)
559
else if (schema.Items[i] is
XmlSchemaElement
element)
932
private void PreprocessElement(
XmlSchemaElement
element)
987
private void PreprocessLocalElement(
XmlSchemaElement
element)
1044
private void PreprocessElementContent(
XmlSchemaElement
element)
1590
XmlSchemaElement
element = (
XmlSchemaElement
)schemaAll.Items[i];
1614
XmlSchemaElement
? element = choices[i] as
XmlSchemaElement
;
1631
XmlSchemaElement
? element = sequences[i] as
XmlSchemaElement
;
System\Xml\Schema\SchemaElementDecl.cs (2)
27
private
XmlSchemaElement
? _schemaElement;
181
internal
XmlSchemaElement
? SchemaElement
System\Xml\Schema\SchemaInfo.cs (1)
132
internal
XmlSchemaElement
? GetElement(XmlQualifiedName qname)
System\Xml\Schema\SchemaSetCompiler.cs (57)
57
foreach (
XmlSchemaElement
? element in schema.Elements.Values)
150
foreach (
XmlSchemaElement
? element in _elements.Values)
221
foreach (
XmlSchemaElement
? element in _elements.Values)
262
foreach (
XmlSchemaElement
? element in _elements.Values)
383
private void CleanupElement(
XmlSchemaElement
element)
430
XmlSchemaElement
? element = particle as
XmlSchemaElement
;
449
foreach (
XmlSchemaElement
? element in _elements.Values)
453
XmlSchemaElement
? headElement = _elements[element.SubstitutionGroup!] as
XmlSchemaElement
;
494
SendValidationEvent(SR.Sch_SubstitutionCircularRef, (
XmlSchemaElement
)substitutionGroup.Members[0]!);
498
XmlSchemaElement
examplar = (
XmlSchemaElement
)_elements[substitutionGroup.Examplar]!;
517
XmlSchemaElement
element = (
XmlSchemaElement
)substitutionGroup.Members[i]!;
1147
foreach (
XmlSchemaElement
? localElement in complexType.LocalElements.Values)
1204
else if (particle is
XmlSchemaElement
)
1231
private XmlSchemaParticle CanonicalizeElement(
XmlSchemaElement
element)
1245
choice.Items.Add((
XmlSchemaElement
)substitutionGroup.Members[i]!);
1340
XmlSchemaParticle p = CanonicalizeParticle((
XmlSchemaElement
)all.Items[i], false);
1527
if (derivedParticle is
XmlSchemaElement
derivedElem)
1531
if (baseParticle is
XmlSchemaElement
baseElem)
1539
else if (derivedParticle is
XmlSchemaElement
)
1541
return IsElementFromElement((
XmlSchemaElement
)derivedParticle, baseElem);
1551
if (derivedParticle is
XmlSchemaElement
)
1553
return IsElementFromAny((
XmlSchemaElement
)derivedParticle, (XmlSchemaAny)baseParticle);
1566
if (derivedParticle is
XmlSchemaElement
)
1568
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle);
1593
if (derivedParticle is
XmlSchemaElement
)
1595
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle);
1627
if (derivedParticle is
XmlSchemaElement
)
1629
return IsElementFromGroupBase((
XmlSchemaElement
)derivedParticle, (XmlSchemaGroupBase)baseParticle);
1652
private bool IsElementFromElement(
XmlSchemaElement
derivedElement,
XmlSchemaElement
baseElement)
1681
private bool IsElementFromAny(
XmlSchemaElement
derivedElement, XmlSchemaAny baseAny)
1785
private bool IsElementFromGroupBase(
XmlSchemaElement
derivedElement, XmlSchemaGroupBase baseGroupBase)
1969
if (particle is
XmlSchemaElement
|| particle is XmlSchemaAny)
2636
private void CompileElement(
XmlSchemaElement
xe)
2653
XmlSchemaElement
? e = (
XmlSchemaElement
?)_elements[xe.RefName];
2682
XmlSchemaElement
? examplar = (
XmlSchemaElement
?)_elements[xe.SubstitutionGroup];
2840
XmlSchemaElement
localElement = (
XmlSchemaElement
)all.Items[i];
2859
if (e.Particle1 is
XmlSchemaElement
)
2861
if (e.Particle2 is
XmlSchemaElement
)
2863
SendValidationEvent(SR.Sch_NonDeterministic, ((
XmlSchemaElement
)e.Particle1).QualifiedName.ToString(), (
XmlSchemaElement
)e.Particle2);
2867
SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle2!).ResolvedNamespace, ((
XmlSchemaElement
)e.Particle1).QualifiedName.ToString(), (XmlSchemaAny)e.Particle2);
2872
if (e.Particle2 is
XmlSchemaElement
)
2874
SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle1!).ResolvedNamespace, ((
XmlSchemaElement
)e.Particle2).QualifiedName.ToString(), (
XmlSchemaElement
)e.Particle2);
2894
if (particle is
XmlSchemaElement
element)
2958
if (particle is
XmlSchemaElement
localElement)
2967
XmlSchemaElement
element = (
XmlSchemaElement
)complexType.LocalElements[localElement.QualifiedName]!;
2986
if (particle is
XmlSchemaElement
localElement)
System\Xml\Schema\XmlSchema.cs (3)
293
XmlElement("element", typeof(
XmlSchemaElement
)),
465
XmlSchemaElement
? element;
472
else if ((element = _items[i] as
XmlSchemaElement
) != null)
System\Xml\Schema\XmlSchemaAll.cs (1)
13
[XmlElement("element", typeof(
XmlSchemaElement
))]
System\Xml\Schema\XmlSchemaChoice.cs (1)
13
[XmlElement("element", typeof(
XmlSchemaElement
)),
System\Xml\Schema\XmlSchemaComplexType.cs (7)
476
XmlSchemaElement
? oldElem = particle as
XmlSchemaElement
;
485
XmlSchemaElement
newElem = (
XmlSchemaElement
)oldElem.Clone(parentSchema);
498
private static XmlSchemaForm GetResolvedElementForm(XmlSchema? parentSchema,
XmlSchemaElement
element)
526
XmlSchemaElement
? elem = p as
XmlSchemaElement
;
System\Xml\Schema\XmlSchemaElement.cs (2)
279
XmlSchemaElement
newElem = (
XmlSchemaElement
)MemberwiseClone();
System\Xml\Schema\XmlSchemaInfo.cs (2)
13
private
XmlSchemaElement
? _schemaElement;
98
public
XmlSchemaElement
? SchemaElement
System\Xml\Schema\XmlSchemaParticle.cs (2)
138
XmlSchemaElement
? elem = this as
XmlSchemaElement
;
System\Xml\Schema\XmlSchemaSequence.cs (1)
12
[XmlElement("element", typeof(
XmlSchemaElement
)),
System\Xml\Schema\XmlSchemaSet.cs (14)
983
List<
XmlSchemaElement
>? newMembers = null;
984
XmlSchemaElement
headElement = (
XmlSchemaElement
)elements![substitutionGroup.Examplar]!;
991
XmlSchemaElement
element = (
XmlSchemaElement
)substitutionGroup.Members[i]!;
1000
XmlSchemaElement
element1 = (
XmlSchemaElement
)g.Members[j]!;
1003
newMembers ??= new List<
XmlSchemaElement
>();
1133
foreach (
XmlSchemaElement
? element in otherSet.GlobalElements.Values)
1175
foreach (
XmlSchemaElement
? elementToRemove in otherSet.GlobalElements.Values)
1353
foreach (
XmlSchemaElement
? elementToRemove in schema.Elements.Values)
1355
XmlSchemaElement
? elem = (
XmlSchemaElement
?)elements![elementToRemove!.QualifiedName];
1405
else if (item is
XmlSchemaElement
)
System\Xml\Schema\XmlSchemaValidator.cs (18)
380
if (!(partialValidationType is
XmlSchemaElement
|| partialValidationType is XmlSchemaAttribute || partialValidationType is XmlSchemaType))
444
XmlSchemaElement
? localSchemaElement = null;
934
XmlSchemaElement
? element = _partialValidationType as
XmlSchemaElement
;
947
foreach (
XmlSchemaElement
? element in elements)
1179
XmlSchemaElement
? localSchemaElement = null;
1310
XmlSchemaElement
? headElement = null;
1359
XmlSchemaElement
? matchedElem = particle as
XmlSchemaElement
;
1388
private
XmlSchemaElement
? GetSubstitutionGroupHead(XmlQualifiedName member)
1390
XmlSchemaElement
? memberElem = _compiledSchemaInfo.GetElement(member);
1396
XmlSchemaElement
? headElem = _compiledSchemaInfo.GetElement(head);
1595
XmlSchemaElement
? element = particle as
XmlSchemaElement
;
1611
if (_partialValidationType is
XmlSchemaElement
element)
2112
private
XmlSchemaElement
? GetSchemaElement()
2122
XmlSchemaElement
xsiElement = (
XmlSchemaElement
)beforeXsiDecl.SchemaElement.Clone(null);
System\Xml\Schema\XsdBuilder.cs (2)
638
private
XmlSchemaElement
? _element;
991
_element = (
XmlSchemaElement
)container;
System\Xml\Schema\XsdValidator.cs (2)
366
XmlSchemaElement
? element = particle as
XmlSchemaElement
;
System\Xml\Serialization\ImportContext.cs (8)
363
else if (t == typeof(
XmlSchemaElement
))
365
XmlSchemaElement
el = (
XmlSchemaElement
)item;
370
XmlSchemaElement
? head = (
XmlSchemaElement
?)_schemas.Find(el.SubstitutionGroup, typeof(
XmlSchemaElement
), false);
376
el = (
XmlSchemaElement
)_schemas.Find(el.RefName, typeof(
XmlSchemaElement
), false)!;
System\Xml\Serialization\Mappings.cs (4)
1211
internal void CheckDuplicateElement(
XmlSchemaElement
? element, string? elementNs)
1234
foreach (
XmlSchemaElement
e in elements.Values)
1246
private static bool Match(
XmlSchemaElement
e1,
XmlSchemaElement
e2)
System\Xml\Serialization\SchemaObjectWriter.cs (7)
82
else if (o is
XmlSchemaElement
)
84
return ((
XmlSchemaElement
)o).QualifiedName;
348
else if (t == typeof(
XmlSchemaElement
))
350
Write46_XmlSchemaElement((
XmlSchemaElement
)o);
968
private void Write46_XmlSchemaElement(
XmlSchemaElement
? o)
1187
else if (ai is
XmlSchemaElement
)
1189
Write46_XmlSchemaElement((
XmlSchemaElement
)ai);
System\Xml\Serialization\XmlSchemaExporter.cs (12)
229
private
XmlSchemaElement
? ExportElement(ElementAccessor accessor)
237
XmlSchemaElement
? element = (
XmlSchemaElement
?)_elements[accessor];
284
if (item is
XmlSchemaElement
e)
367
private void ExportElementMapping(
XmlSchemaElement
element, Mapping mapping, string? ns, bool isAny)
412
private XmlSchemaType? ExportSpecialMapping(SpecialMapping mapping, string? ns, bool isAny,
XmlSchemaElement
? element)
524
XmlSchemaElement
schemaElement = new XmlSchemaElement();
588
private void ExportArrayMapping(ArrayMapping mapping, string? ns,
XmlSchemaElement
? element)
814
XmlSchemaElement
? element = (
XmlSchemaElement
?)_elements[accessor];
849
XmlSchemaElement
refElement = new XmlSchemaElement();
959
private XmlQualifiedName ExportStructMapping(StructMapping mapping, string? ns,
XmlSchemaElement
? element)
System\Xml\Serialization\XmlSchemaImporter.cs (35)
156
XmlSchemaElement
element = new XmlSchemaElement();
231
XmlSchemaElement
element = new XmlSchemaElement();
251
XmlSchemaElement
element = FindElement(name);
266
private ElementAccessor ImportElement(
XmlSchemaElement
element, string identifier, Type desiredMappingType, Type? baseType, string? ns, bool topLevelElement)
326
private TypeMapping ImportElementType(
XmlSchemaElement
element, string identifier, Type desiredMappingType, Type? baseType, string? ns)
954
else if (item is
XmlSchemaElement
element)
956
XmlSchemaElement
? headElement = GetTopLevelElement(element);
959
XmlSchemaElement
[] elements = GetEquivalentElements(headElement);
1044
else if (item is
XmlSchemaElement
)
1045
ImportElementMember((
XmlSchemaElement
)item, identifier, members, membersScope, elementsScope, ns, groupRepeats, ref needExplicitOrder, allowDuplicates, allowUnboundedElements);
1059
private
XmlSchemaElement
? GetTopLevelElement(
XmlSchemaElement
element)
1067
private
XmlSchemaElement
[] GetEquivalentElements(
XmlSchemaElement
element)
1076
if (item is
XmlSchemaElement
equivalentElement)
1088
return (
XmlSchemaElement
[])equivalentElements.ToArray(typeof(
XmlSchemaElement
));
1093
private bool ImportSubstitutionGroupMember(
XmlSchemaElement
element, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, string? ns, bool repeats, ref bool needExplicitOrder, bool allowDuplicates)
1095
XmlSchemaElement
[] elements = GetEquivalentElements(element);
1240
private ElementAccessor? ImportArray(
XmlSchemaElement
element, string identifier, string? ns, bool repeats)
1300
if (item.Items.Count != 1 || !(item.Items[0] is
XmlSchemaElement
)) return null;
1301
XmlSchemaElement
itemElement = (
XmlSchemaElement
)item.Items[0];
1331
private bool IsCyclicReferencedType(
XmlSchemaElement
element, List<string> identifiers)
1335
XmlSchemaElement
refElement = FindElement(element.RefName);
1350
if ((items.Particle is XmlSchemaSequence || items.Particle is XmlSchemaAll) && items.Particle.Items.Count == 1 && items.Particle.Items[0] is
XmlSchemaElement
)
1352
XmlSchemaElement
innerRefElement = (
XmlSchemaElement
)items.Particle.Items[0];
1405
private void ImportElementMember(
XmlSchemaElement
element, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string? ns, bool repeats, ref bool needExplicitOrder, bool allowDuplicates, bool allowUnboundedElements)
1408
XmlSchemaElement
? headElement = GetTopLevelElement(element);
1962
private
XmlSchemaElement
FindElement(XmlQualifiedName name)
1964
XmlSchemaElement
? element = (
XmlSchemaElement
?)Schemas.Find(name, typeof(
XmlSchemaElement
));
1979
private static XmlSchemaForm ElementForm(string? ns,
XmlSchemaElement
element)
System\Xml\Serialization\XmlSchemas.cs (6)
246
else if (type == typeof(
XmlSchemaElement
))
303
if (o is
XmlSchemaElement
e)
448
else if (o is
XmlSchemaElement
)
450
return ((
XmlSchemaElement
)o).Name;
515
else if (o is
XmlSchemaElement
e)
738
XmlSchemaElement
element = new XmlSchemaElement();
System\Xml\XPath\XPathNavigator.cs (2)
989
XmlSchemaElement
? schemaElement = null;
1053
private static XmlReader GetValidatingReader(XmlReader reader, XmlSchemaSet schemas, ValidationEventHandler validationEvent, XmlSchemaType? schemaType,
XmlSchemaElement
? schemaElement, XmlSchemaAttribute? schemaAttribute)
System\Xml\XPath\XPathNavigatorReader.cs (1)
1135
public
XmlSchemaElement
? SchemaElement { get { return IsReading ? this.schemaInfo!.SchemaElement : null; } }
System.Private.Xml.Linq (6)
System\Xml\Schema\XNodeValidator.cs (6)
140
private string? GetDefaultValue(
XmlSchemaElement
se)
142
XmlSchemaElement
? seCopy = se;
146
seCopy = schemas.GlobalElements[name] as
XmlSchemaElement
;
414
XmlSchemaElement
? schemaElement = si.SchemaElement;
492
/// <param name="partialValidationType">An <see cref="
XmlSchemaElement
"/> or
508
/// <param name="partialValidationType">An <see cref="
XmlSchemaElement
"/> or
System.Runtime.Serialization.Schema (11)
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (11)
37
private
XmlSchemaElement
[] _singleElementArray = null!; // Not directly referenced. Always lazy initialized by property getter.
127
/// <param name="element">An <see cref="
XmlSchemaElement
"/> that represents the specific schema element to transform.</param>
130
public XmlQualifiedName? Import(XmlSchemaSet schemas,
XmlSchemaElement
element)
198
/// <param name="element">A specific <see cref="
XmlSchemaElement
"/> to check in the set of schemas.</param>
201
public bool CanImport(XmlSchemaSet schemas,
XmlSchemaElement
element)
230
/// <param name="element">An <see cref="
XmlSchemaElement
"/> that specifies an element in an XML schema.</param>
233
public CodeTypeReference GetCodeTypeReference(XmlQualifiedName typeName,
XmlSchemaElement
element)
291
private
XmlSchemaElement
[] SingleElementArray
295
return _singleElementArray ??= new
XmlSchemaElement
[1];
300
private IList<XmlQualifiedName>? InternalImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName>? typeNames, ICollection<
XmlSchemaElement
>? elements)
335
private bool InternalCanImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName>? typeNames, ICollection<
XmlSchemaElement
>? elements)
System.Xml (1)
System.Xml.cs (1)
48
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlSchemaElement
))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
47
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.
XmlSchemaElement
))]