OnTopReplica/src/OnTopReplica/StoredRegionComparer.cs
Lorenz Cuno Klopfenstein a7774b6677 Code re-org
2018-04-10 18:52:40 +02:00

29 lines
631 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace OnTopReplica {
/// <summary>
/// Compares two StoredRegions based on their name.
/// </summary>
class StoredRegionComparer : IComparer {
#region IComparer Members
public int Compare(object x, object y) {
StoredRegion a = x as StoredRegion;
StoredRegion b = y as StoredRegion;
if (a == null || b == null)
return -1; //this is wrong, but anyway
return a.Name.CompareTo(b.Name);
}
#endregion
}
}