public void ForProperty <TProperty>(Expression <Func <T, TProperty> > propertyExpression, ISoftEqualityComparer <TProperty> comparer = null)
        {
            var propertyWrapper = PropertyWrapperHelper.Create(propertyExpression, comparer ?? _comparerProvider.Get <TProperty>());

            Add(propertyWrapper, true);
        }
 public static IPropertyWrapper <T> Create <T, TProperty>(Expression <Func <T, TProperty> > propertyExpression, ISoftEqualityComparerProvider comparerProvider)
 {
     return(new PropertyWrapper <T, TProperty>(propertyExpression, comparerProvider.Get <TProperty>()));
 }
Exemple #3
0
        public void AddMatchEvaluator <TProperty>(int weight, Func <T, TProperty> propertyAccessor, ISoftEqualityComparer <TProperty> comparer = null)
        {
            var matchEvaluator = new MatchEvaluator <T, TProperty>(propertyAccessor, weight, comparer ?? _comparerProvider.Get <TProperty>());

            _matchEvaluators.Add(matchEvaluator);
        }