tournament result reworked (UI and code)
Check for duplicate (case) in player's name.
This commit is contained in:
28
LaDOSE.Src/LaDOSE.DesktopApp/Utils/CustomEqualityCompare.cs
Normal file
28
LaDOSE.Src/LaDOSE.DesktopApp/Utils/CustomEqualityCompare.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LaDOSE.DesktopApp.Utils
|
||||
{
|
||||
public static class CustomListExtension
|
||||
{
|
||||
public sealed class EqualityComparer<T> : IEqualityComparer<T> where T : class
|
||||
{
|
||||
private readonly Func<T, T, bool> _compare;
|
||||
|
||||
public EqualityComparer(Func<T, T, bool> c)
|
||||
{
|
||||
_compare = c;
|
||||
}
|
||||
|
||||
public bool Equals(T x, T y)
|
||||
{
|
||||
return _compare(x, y);
|
||||
}
|
||||
|
||||
public int GetHashCode(T obj)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user