Ejemplo n.º 1
0
        public override FilterValueSetParam GetFilterValue(
            MatchedEventMap matchedEvents,
            ExprEvaluatorContext exprEvaluatorContext,
            StatementContextFilterEvalEnv filterEvalEnv)
        {
            ExprFilterSpecLookupable lookupable = this.Lkupable.Make(matchedEvents, exprEvaluatorContext);
            Object range;

            if (lookupable.ReturnType == typeof(string))
            {
                var begin = (string)Min.GetFilterValue(matchedEvents, exprEvaluatorContext, filterEvalEnv);
                var end   = (string)Max.GetFilterValue(matchedEvents, exprEvaluatorContext, filterEvalEnv);
                range = new StringRange(begin, end);
            }
            else
            {
                var begin = (double)Min.GetFilterValue(matchedEvents, exprEvaluatorContext, filterEvalEnv);
                var end   = (double)Max.GetFilterValue(matchedEvents, exprEvaluatorContext, filterEvalEnv);
                range = new DoubleRange(begin, end);
            }

            return(new FilterValueSetParamImpl(lookupable, FilterOperator, range));
        }