Initial commit
This commit is contained in:
commit
1be1863b20
50 changed files with 6449 additions and 0 deletions
22
MeetTheTeacher/Model/Comparison/ByNameComparer.cs
Normal file
22
MeetTheTeacher/Model/Comparison/ByNameComparer.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue