public Func<object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { var elementType = type.GetTypeInfo().GetGenericArguments().First(); var inner = checker.CheckerFor(elementType); return (expected, actual) => new CollectionComparer(inner).Matches(expected, actual); }
public Func <object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { return((expected, actual) => { if (actual != null) { return expected != null && expected.Equals(actual); } return expected == null || expected.Equals(null); }); }
public Func <object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { var inner = checker.CheckerFor(type.GetElementType()); return((expected, actual) => new CollectionComparer(inner).Matches(expected, actual)); }
public CellHandling(EquivalenceChecker equivalence, Conversions conversions) { Equivalence = equivalence; Conversions = conversions; }
public Func<object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { var inner = checker.CheckerFor(type.GetElementType()); return (expected, actual) => new CollectionComparer(inner).Matches(expected, actual); }
public Func<object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { var equalizerType = typeof(Equalizer<>).MakeGenericType(type); var equalizer = (IEqualizer)Activator.CreateInstance(equalizerType); return equalizer.Matches; }
public Func<object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { return (expected, actual) => expected.Equals(actual); }
public Func <object, object, bool> CreateComparison(Type type, EquivalenceChecker checker) { return((expected, actual) => expected.Equals(actual)); }