コード例 #1
0
        public static PersistenceSpecification <T> CheckBag <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.CheckBag(expression, propertyValue, (IEqualityComparer)null));
            }

            return(spec.CheckBag(expression, propertyValue, new FuncEqualityComparer <TListElement>(propertiesToCompare)));
        }
コード例 #2
0
 public static PersistenceSpecification <T> CheckBag <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                       Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                       IEnumerable <TListElement> propertyValue,
                                                                       Action <T, IEnumerable <TListElement> > listSetter)
 {
     return(spec.CheckBag(expression, propertyValue, null, listSetter));
 }
コード例 #3
0
 public static PersistenceSpecification <T> CheckBag <T, TListElement>(this PersistenceSpecification <T> spec,
                                                                       Expression <Func <T, IEnumerable <TListElement> > > expression,
                                                                       IEnumerable <TListElement> propertyValue)
 {
     return(spec.CheckBag(expression, propertyValue, (IEqualityComparer)null));
 }