Esempio n. 1
0
        public override Object GetFilterValue(MatchedEventMap matchedEvents, ExprEvaluatorContext evaluatorContext)
        {
            if (Lookupable.ReturnType == typeof(String))
            {
                return(new StringRange((String)_min.GetFilterValue(matchedEvents, evaluatorContext), (String)_max.GetFilterValue(matchedEvents, evaluatorContext)));
            }
            var begin = (double?)_min.GetFilterValue(matchedEvents, evaluatorContext);
            var end   = (double?)_max.GetFilterValue(matchedEvents, evaluatorContext);

            return(new DoubleRange(begin, end));
        }
Esempio n. 2
0
        public override object GetFilterValue(MatchedEventMap matchedEvents, AgentInstanceContext agentInstanceContext)
        {
            if (Lookupable.ReturnType == typeof(String))
            {
                return(new StringRange((String)_min.GetFilterValue(matchedEvents, agentInstanceContext), (String)_max.GetFilterValue(matchedEvents, agentInstanceContext)));
            }
            var begin = (double?)_min.GetFilterValue(matchedEvents, agentInstanceContext);
            var end   = (double?)_max.GetFilterValue(matchedEvents, agentInstanceContext);

            return(new DoubleRange(begin, end));
        }
Esempio n. 3
0
 private void TryInvalidGetFilterValue(MatchedEventMap matchedEvents, FilterSpecParamRangeValue value)
 {
     try
     {
         value.GetFilterValue(matchedEvents, null);
         Assert.Fail();
     }
     catch (IllegalStateException ex)
     {
         // expected
     }
     catch (PropertyAccessException ex)
     {
         // expected
     }
 }