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

◆ SortAttributes()

void System.Xml.XmlCanonicalWriter.SortAttributes ( )
inlineprivate

Definition at line 871 of file XmlCanonicalWriter.cs.

872 {
873 if (_attributeCount < 16)
874 {
875 for (int i = 0; i < _attributeCount - 1; i++)
876 {
877 int num = i;
878 for (int j = i + 1; j < _attributeCount; j++)
879 {
880 if (Compare(ref _attributes[j], ref _attributes[num]) < 0)
881 {
882 num = j;
883 }
884 }
885 if (num != i)
886 {
888 _attributes[i] = _attributes[num];
889 _attributes[num] = attribute;
890 }
891 }
892 }
893 else
894 {
895 new AttributeSorter(this).Sort();
896 }
897 }
int Compare(ref XmlnsAttribute xmlnsAttribute1, ref XmlnsAttribute xmlnsAttribute2)

References System.Xml.XmlCanonicalWriter._attributeCount, System.Xml.XmlCanonicalWriter._attributes, System.Xml.XmlCanonicalWriter.Compare(), System.Xml.Dictionary, and System.Xml.XmlCanonicalWriter.AttributeSorter.Sort().

Referenced by System.Xml.XmlCanonicalWriter.WriteEndStartElement().