Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CompileAttributeGroup()

void System.Xml.Schema.Compiler.CompileAttributeGroup ( XmlSchemaAttributeGroup attributeGroup)
inlineprivate

Definition at line 1841 of file Compiler.cs.

1842 {
1843 if (attributeGroup.IsProcessing)
1844 {
1846 }
1847 else
1848 {
1849 if (attributeGroup.AttributeUses.Count > 0)
1850 {
1851 return;
1852 }
1854 XmlSchemaAnyAttribute xmlSchemaAnyAttribute = attributeGroup.AnyAttribute;
1855 try
1856 {
1857 for (int i = 0; i < attributeGroup.Attributes.Count; i++)
1858 {
1859 if (attributeGroup.Attributes[i] is XmlSchemaAttribute xmlSchemaAttribute)
1860 {
1861 if (xmlSchemaAttribute.Use != XmlSchemaUse.Prohibited)
1862 {
1864 if (attributeGroup.AttributeUses[xmlSchemaAttribute.QualifiedName] == null)
1865 {
1866 attributeGroup.AttributeUses.Add(xmlSchemaAttribute.QualifiedName, xmlSchemaAttribute);
1867 }
1868 else
1869 {
1871 }
1872 }
1873 continue;
1874 }
1875 XmlSchemaAttributeGroupRef xmlSchemaAttributeGroupRef = (XmlSchemaAttributeGroupRef)attributeGroup.Attributes[i];
1876 XmlSchemaAttributeGroup xmlSchemaAttributeGroup = ((attributeGroup.Redefined == null || !(xmlSchemaAttributeGroupRef.RefName == attributeGroup.Redefined.QualifiedName)) ? ((XmlSchemaAttributeGroup)_attributeGroups[xmlSchemaAttributeGroupRef.RefName]) : attributeGroup.Redefined);
1877 if (xmlSchemaAttributeGroup != null)
1878 {
1880 foreach (XmlSchemaAttribute value in xmlSchemaAttributeGroup.AttributeUses.Values)
1881 {
1882 if (attributeGroup.AttributeUses[value.QualifiedName] == null)
1883 {
1884 attributeGroup.AttributeUses.Add(value.QualifiedName, value);
1885 }
1886 else
1887 {
1888 SendValidationEvent(System.SR.Sch_DupAttributeUse, value.QualifiedName.ToString(), value);
1889 }
1890 }
1892 }
1893 else
1894 {
1896 }
1897 }
1899 }
1900 finally
1901 {
1903 }
1904 }
1905 }
void Add(TKey key, TValue value)
static string Sch_UndefAttributeGroupRef
Definition SR.cs:1044
static string Sch_DupAttributeUse
Definition SR.cs:986
static string Sch_AttributeGroupCircularRef
Definition SR.cs:1042
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void CompileAttributeGroup(XmlSchemaAttributeGroup attributeGroup)
Definition Compiler.cs:1841
XmlSchemaAnyAttribute CompileAnyAttributeIntersection(XmlSchemaAnyAttribute a, XmlSchemaAnyAttribute b)
Definition Compiler.cs:2115
void CompileAttribute(XmlSchemaAttribute xa)
Definition Compiler.cs:2133
readonly XmlSchemaObjectTable _attributeGroups
Definition Compiler.cs:14

References System.Xml.Schema.Compiler._attributeGroups, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.Compiler.CompileAnyAttributeIntersection(), System.Xml.Schema.Compiler.CompileAttribute(), System.Xml.Schema.Compiler.CompileAttributeGroup(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.SR.Sch_AttributeGroupCircularRef, System.SR.Sch_DupAttributeUse, System.SR.Sch_UndefAttributeGroupRef, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.

Referenced by System.Xml.Schema.Compiler.Compile(), System.Xml.Schema.Compiler.CompileAttributeGroup(), System.Xml.Schema.Compiler.CompileLocalAttributes(), and System.Xml.Schema.Compiler.RecursivelyCheckRedefinedAttributeGroups().