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())); } }
protected ComparerResult CompareObjects(object x, object y, TextSingleMethodTolerance tolerance) { return(CompareStrings(x as string, y as string, tolerance)); }