mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-20 20:33:06 +12:00
29 lines
631 B
C#
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
|
|
|
|
}
|
|
}
|