22 lines
806 B
C#
22 lines
806 B
C#
namespace MeetTheTeacher.Model.Comparison;
|
|
|
|
/// <summary>
|
|
/// A comparer which allows sorting <see cref="Teacher" /> instances by their name in either ascending or descending
|
|
/// order
|
|
/// </summary>
|
|
/// <inheritdoc cref="ComparerBase" />
|
|
/// <inheritdoc cref="IComparer{Teacher}"/>
|
|
public sealed class ByNameComparer : ComparerBase, IComparer<Teacher>
|
|
{
|
|
/// <summary>
|
|
/// Creates a new instance of <see cref="ByNameComparer" /> configured to sort in ascending or descending order
|
|
/// </summary>
|
|
/// <param name="ascending">Flag indicating if items should be sorted in ascending order; descending if false</param>
|
|
public ByNameComparer(bool ascending) : base(ascending) { }
|
|
|
|
public int Compare(Teacher? x, Teacher? y)
|
|
{
|
|
// TODO
|
|
return -1;
|
|
}
|
|
}
|