コード例 #1
0
        public static IWhereFragment Append(this IWhereFragment fragment, IWhereFragment[] others)
        {
            if (!others.Any())
            {
                return(fragment);
            }

            foreach (var other in others)
            {
                fragment = fragment.Append(other);
            }

            return(fragment);
        }
コード例 #2
0
        public static IWhereFragment Append(this IWhereFragment fragment, IWhereFragment[] others)
        {
            if (others?.Any() == false)
            {
                return(fragment);
            }

            if (fragment == null)
            {
                return(Append(others.First(), others.Skip(1).ToArray()));
            }

            foreach (var other in others)
            {
                fragment = fragment.Append(other);
            }

            return(fragment);
        }
コード例 #3
0
        public IWhereFragment FilterDocuments(QueryModel model, IWhereFragment query)
        {
            var extras = extraFilters(query).ToArray();

            return(query.Append(extras));
        }