Exemplo n.º 1
0
        /// <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, FilterSpecParamRangeValue min, FilterSpecParamRangeValue 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");
            }
        }
Exemplo n.º 2
0
 private void TryInvalidGetFilterValue(MatchedEventMap matchedEvents, FilterSpecParamRangeValue value)
 {
     try
     {
         value.GetFilterValue(matchedEvents, null);
         Assert.Fail();
     }
     catch (IllegalStateException ex)
     {
         // expected
     }
     catch (PropertyAccessException ex)
     {
         // expected
     }
 }
Exemplo n.º 3
0
 private double GetConstant(FilterSpecParamRangeValue param)
 {
     return(((RangeValueDouble)param).DoubleValue);
 }