AbstractComparer.cs 379 B

123456789101112131415
  1. using System.Collections.Generic;
  2. using System.Globalization;
  3. using System.Linq;
  4. using Xamarin.Forms;
  5. namespace InABox.Mobile
  6. {
  7. public abstract class AbstractComparer<T> : AbstractMultiConverter<T,bool>
  8. {
  9. protected override bool Convert(IEnumerable<T> value, object parameter = null)
  10. {
  11. return value?.Distinct().Count() == 1;
  12. }
  13. }
  14. }