public XmlDoubleSortKey(double value, XmlCollation collation)
{
if (Double.IsNaN(value))
{
// Treat NaN as if it were the empty sequence
_isNaN = true;
// Greatest, Ascending: isEmptyGreatest = true
// Greatest, Descending: isEmptyGreatest = false
// Least, Ascending: isEmptyGreatest = false
// Least, Descending: isEmptyGreatest = true
_dblVal = (collation.EmptyGreatest != collation.DescendingOrder) ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else
{
_dblVal = collation.DescendingOrder ? -value : value;
}
}