Exemplo n.º 1
0
 public static bool IsAtMostExclusive <T>(this T value, T max, IComparer <T>?comparer) =>
 comparer.OrDefault().Compare(value, max) < 0;
Exemplo n.º 2
0
 public PropertyComparer(Func <T, P> getProperty, IComparer <P>?propertyComparer = null)
 {
     this.getProperty      = getProperty ?? throw new ArgumentNullException(nameof(getProperty));
     this.propertyComparer = propertyComparer.OrDefault();
 }
Exemplo n.º 3
0
 public static bool IsAtLeastExclusive <T>(this T value, T min, IComparer <T>?comparer) =>
 comparer.OrDefault().Compare(value, min) > 0;