Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static IPropertyWrapper <T> Create <T, TProperty>(Expression <Func <T, TProperty> > propertyExpression, ISoftEqualityComparerProvider comparerProvider)
 {
     return(new PropertyWrapper <T, TProperty>(propertyExpression, comparerProvider.Get <TProperty>()));
 }
Exemplo n.º 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);
        }