Пример #1
0
        public override bool Satisfies(DataElement obj)
        {
            bool result;

            int  val;
            bool applicable = obj.GetIntFromDataPath(dpath, out val);

            if (!applicable)
            {
                result = false;
            }
            else
            {
                switch (FilterType)
                {
                case IntFilterType.EQUAL:
                    result = val == RefValue;
                    break;

                case IntFilterType.GREATER_THAN:
                    result = val > RefValue;
                    break;

                case IntFilterType.LESS_THAN:
                    result = val < RefValue;
                    break;

                default:
                    result = false;
                    break;
                }
            }

            return(result ^ NegateResult);
        }