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()); }
protected bool Equals(SupportFilterSpecParamConstant other) { return(Equals(FilterConstant, other.FilterConstant)); }