Esempio n. 1
0
        protected ComparerResult CompareStrings(string x, string y, TextSingleMethodTolerance tolerance)
        {
            var distance = tolerance.Implementation.Invoke(x, y);

            if (tolerance.Predicate.Invoke(distance, tolerance.Value))
            {
                return(ComparerResult.Equality);
            }
            else
            {
                return(new ComparerResult(distance.ToString()));
            }
        }
Esempio n. 2
0
 protected ComparerResult CompareObjects(object x, object y, TextSingleMethodTolerance tolerance)
 {
     return(CompareStrings(x as string, y as string, tolerance));
 }