コード例 #1
0
        public static FilterSpecPlanPathTriplet[] BuildTriplets(
            EventType eventType,
            object[] objects)
        {
            IList <FilterSpecPlanPathTriplet> filterParams = new List <FilterSpecPlanPathTriplet>();

            var index = 0;

            while (objects.Length > index)
            {
                var propertyName   = (string)objects[index++];
                var filterOperator = (FilterOperator)objects[index++];

                if (!(filterOperator.IsRangeOperator()))
                {
                    var             filterForConstant = objects[index++];
                    FilterSpecParam param             = new SupportFilterSpecParamConstant(MakeLookupable(eventType, propertyName), filterOperator, filterForConstant);
                    filterParams.Add(new FilterSpecPlanPathTriplet(param));
                }
                else
                {
                    var             min   = objects[index++].AsDouble();
                    var             max   = objects[index++].AsDouble();
                    FilterSpecParam param = new SupportFilterSpecParamRange(
                        MakeLookupable(eventType, propertyName),
                        filterOperator,
                        new SupportFilterForEvalConstantDouble(min),
                        new SupportFilterForEvalConstantDouble(max));
                    filterParams.Add(new FilterSpecPlanPathTriplet(param));
                }
            }

            return(filterParams.ToArray());
        }
コード例 #2
0
 protected bool Equals(SupportFilterSpecParamConstant other)
 {
     return(Equals(FilterConstant, other.FilterConstant));
 }