public static T Maximum <T>(this T value, T maximum) where T : struct, IComparable <T> { FuzzyRange <T> spec = FuzzyContext.Get <T, FuzzyRange <T> >(value); spec.Maximum = maximum; return(spec); }
public static string LettersOrDigits(this string value) { FuzzyString spec = FuzzyContext.Get <string, FuzzyString>(value); spec.Characters = spec.Characters.Where(c => char.IsLetterOrDigit(c)).ToArray(); return(spec); }