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

◆ Compare() [1/2]

int System.Xml.XmlTextReaderImpl.DtdDefaultAttributeInfoToNodeDataComparer.Compare ( object x,
object y )
inline

Definition at line 802 of file XmlTextReaderImpl.cs.

803 {
804 if (x == null)
805 {
806 if (y != null)
807 {
808 return -1;
809 }
810 return 0;
811 }
812 if (y == null)
813 {
814 return 1;
815 }
816 string localName;
817 string prefix;
818 if (x is NodeData nodeData)
819 {
820 localName = nodeData.localName;
821 prefix = nodeData.prefix;
822 }
823 else
824 {
825 if (!(x is IDtdDefaultAttributeInfo dtdDefaultAttributeInfo))
826 {
827 throw new XmlException(System.SR.Xml_DefaultException, string.Empty);
828 }
829 localName = dtdDefaultAttributeInfo.LocalName;
831 }
832 string localName2;
833 string prefix2;
834 if (y is NodeData nodeData2)
835 {
836 localName2 = nodeData2.localName;
837 prefix2 = nodeData2.prefix;
838 }
839 else
840 {
841 if (!(y is IDtdDefaultAttributeInfo dtdDefaultAttributeInfo2))
842 {
843 throw new XmlException(System.SR.Xml_DefaultException, string.Empty);
844 }
847 }
848 int num = string.Compare(localName, localName2, StringComparison.Ordinal);
849 if (num != 0)
850 {
851 return num;
852 }
853 return string.Compare(prefix, prefix2, StringComparison.Ordinal);
854 }
static string Xml_DefaultException
Definition SR.cs:16
Definition SR.cs:7

References System.Xml.Dictionary, System.prefix, System.SR.Xml_DefaultException, and System.Xml.XmlException.