示例#1
0
        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);
        }
示例#2
0
        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);
        }