Files
2025-10-11 09:42:00 -04:00

31 lines
849 B
C#

using System.Collections.Generic;
namespace Endpoint
{
/// <summary>
/// Compares a Status for which is the worst status.
/// </summary>
public class StatusComparer : IComparer<Status>
{
/// <summary>
/// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
/// </summary>
/// <param name="x">The first object to compare.</param>
/// <param name="y">The second object to compare.</param>
/// <returns>
/// Value
/// Condition
/// Less than zero
/// <paramref name="x"/> is less than <paramref name="y"/>.
/// Zero
/// <paramref name="x"/> equals <paramref name="y"/>.
/// Greater than zero
/// <paramref name="x"/> is greater than <paramref name="y"/>.
/// </returns>
public int Compare(Status x, Status y)
{
return y.CompareTo(x);
}
}
}