/// <summary>Constructor. </summary>
        /// <param name="lookupable">is the lookupable</param>
        /// <param name="filterOperator">is the type of range operator</param>
        /// <param name="min">is the begin point of the range</param>
        /// <param name="max">is the end point of the range</param>
        /// <throws>ArgumentException if an operator was supplied that does not take a double range value</throws>
        public FilterSpecParamRange(FilterSpecLookupable lookupable, FilterOperator filterOperator, FilterSpecParamFilterForEval min, FilterSpecParamFilterForEval max)
            : base(lookupable, filterOperator)
        {
            _min = min;
            _max = max;

            if (!(filterOperator.IsRangeOperator()) && (!filterOperator.IsInvertedRangeOperator()))
            {
                throw new ArgumentException("Illegal filter operator " + filterOperator + " supplied to " +
                                            "range filter parameter");
            }
        }
 private void TryInvalidGetFilterValue(MatchedEventMap matchedEvents, FilterSpecParamFilterForEval value)
 {
     try
     {
         value.GetFilterValue(matchedEvents, null);
         Assert.Fail();
     }
     catch (IllegalStateException)
     {
         // expected
     }
     catch (PropertyAccessException)
     {
         // expected
     }
 }
Exemple #3
0
        private double GetConstant(FilterSpecParamFilterForEval param)
        {
            var constant = (FilterForEvalConstantDouble)param;

            return(constant.DoubleValue);
        }