public static PersistenceSpecification <T> CheckList <T, TListElement>(this PersistenceSpecification <T> spec, Expression <Func <T, IEnumerable <TListElement> > > expression, IEnumerable <TListElement> propertyValue, params Func <TListElement, object>[] propertiesToCompare) { // Because of the params keyword, the compiler can select this overload // instead of the one above, even when no funcs are supplied in the method call. if (propertiesToCompare == null || propertiesToCompare.Length == 0) { return(spec.CheckList(expression, propertyValue, (IEqualityComparer)null)); } return(spec.CheckList(expression, propertyValue, new FuncEqualityComparer <TListElement>(propertiesToCompare))); }
public static PersistenceSpecification <T> CheckEnumerable <T, TItem>(this PersistenceSpecification <T> spec, Expression <Func <T, IEnumerable <TItem> > > expression, Action <T, TItem> addAction, IEnumerable <TItem> itemsToAdd) { return(spec.CheckList(expression, itemsToAdd, addAction)); }
public static PersistenceSpecification <T> CheckList <T, TListElement>(this PersistenceSpecification <T> spec, Expression <Func <T, IEnumerable <TListElement> > > expression, IEnumerable <TListElement> propertyValue, Action <T, IEnumerable <TListElement> > listSetter) { return(spec.CheckList(expression, propertyValue, null, listSetter)); }
public static PersistenceSpecification <T> CheckList <T, TListElement>(this PersistenceSpecification <T> spec, Expression <Func <T, IEnumerable <TListElement> > > expression, IEnumerable <TListElement> propertyValue) { return(spec.CheckList(expression, propertyValue, (IEqualityComparer)null)); }