internal override int Compare(object value1, object value2)
{
System.Array arr1 = (System.Array)value1;
System.Array arr2 = (System.Array)value2;
Debug.Assert(arr1 != null && arr2 != null);
int length = arr1.Length;
if (length != arr2.Length)
{
return -1;
}
XmlAtomicValue[] atomicValues1 = arr1 as XmlAtomicValue[];
if (atomicValues1 != null)
{
XmlAtomicValue[] atomicValues2 = arr2 as XmlAtomicValue[];
Debug.Assert(atomicValues2 != null);
XmlSchemaType xmlType1;
for (int i = 0; i < atomicValues1.Length; i++)
{
xmlType1 = atomicValues1[i].XmlType;
if (xmlType1 != atomicValues2[i].XmlType || !xmlType1.Datatype.IsEqual(atomicValues1[i].TypedValue, atomicValues2[i].TypedValue))
{
return -1;
}
}
return 0;
}
else
{
for (int i = 0; i < arr1.Length; i++)
{
if (_itemType.Compare(arr1.GetValue(i), arr2.GetValue(i)) != 0)
{
return -1;
}
}
return 0;
}
}