1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 06:56:10 +00:00
This commit is contained in:
Yan Maniez 2018-10-07 02:26:03 +02:00
parent f1ee0e3833
commit 8970b61b99

View file

@ -39,6 +39,18 @@ namespace AideDeJeu.ViewModels
return string.IsNullOrEmpty(filterValue) || (itemValue != null && itemValue.ToLower().Contains(filterValue.ToLower()));
}
public bool MatchEquals(string itemValue, string filterValue)
{
return string.IsNullOrEmpty(filterValue) || (itemValue != null && itemValue.ToLower().Equals(filterValue.ToLower()));
}
public bool MatchRange(string itemValue, string filterMinValue, string filterMaxValue, IComparer<string> comparer)
{
return
(string.IsNullOrEmpty(filterMinValue) || comparer.Compare(itemValue, filterMinValue) >= 0) &&
(string.IsNullOrEmpty(filterMaxValue) || comparer.Compare(itemValue, filterMaxValue) <= 0);
}
protected void RegisterFilters()
{
foreach (var filter in Filters)