private void DiscoverProperties() { if (_discoveredProperties) { return; } _discoveredProperties = true; var type = typeof(T); var properties = type.GetProperties(); foreach (var property in properties) { if (!IsSimpleType(property.PropertyType)) { continue; } var propertyWrapper = PropertyWrapperHelper.Create <T>(property, _comparerProvider); Add(propertyWrapper, false); } }
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); }