private EquivalenceComparer(PropertyNameFilter filter, IDictionary <Type, EquivalenceComparer> nestedComparers, Stack <object> leftStack, Stack <object> rightStack) { _leftStack = leftStack; _rightStack = rightStack; _propertyFilter = filter == null ? GlobalFilter : filter.Union(GlobalFilter); _nestedComparers = nestedComparers == null ? new Dictionary <Type, EquivalenceComparer>() : new Dictionary <Type, EquivalenceComparer>(nestedComparers); }
public Builder <T> Includes(params Expression <Func <T, object> >[] propertyNames) { _propertyFilter = _propertyFilter.Union(PropertyNameFilter.ToInclude(propertyNames)); return(this); }
public Builder <T> Includes(IEnumerable <string> propertyNames) { typeof(T).RequireProperties(propertyNames); _propertyFilter = _propertyFilter.Union(PropertyNameFilter.ToInclude(propertyNames)); return(this); }
public Builder <T> Excludes(IEnumerable <string> propertyNames) { _propertyFilter = _propertyFilter.Union(PropertyNameFilter.ToExclude(propertyNames)); return(this); }
/// <summary> /// Internal so as to test. Do not use this constructor in production code /// </summary> internal EquivalenceComparer(PropertyNameFilter filter, IDictionary <Type, EquivalenceComparer> nestedComparers) : this(filter, nestedComparers, new Stack <object>(), new Stack <object>()) { }
public static void ClearGlobalFilter() { GlobalFilter = PropertyNameFilter.NoFilter; }
public PropertiesSetter(IDictionary <Type, object> values, PropertyNameFilter propertyFilter) { _propertyFilter = propertyFilter; _registeredDataGenerators = CreateDataGenerators(values); }
public static PropertiesSetter DefaultFilteredSetter(PropertyNameFilter filter) { return(new PropertiesSetter(CreateDefaultPropertyValues(), filter)); }