internal static bool Check(SearchExpression e, SearchExpressionContext c)
        {
            var result = e.Execute(c);
            var count  = result.Count();

            if (count == 0)
            {
                return(false);
            }
            if (count == 1)
            {
                return(IsTrue(result.First()));
            }
            return(true);
        }
        public static SearchExpression CreateStreamExpression(SearchExpression currentStream, string name = "<streamexpr>")
        {
            var exp = new SearchExpression(SearchExpressionType.Function, name.GetStringView(),
                                           new SearchExpressionEvaluator("StreamEvaluator", context => currentStream.Execute(context), SearchExpressionEvaluationHints.Default));

            return(exp);
        }