예제 #1
0
        public bool Remove(ConditionSet conditionSet, T value)
        {
            if (conditionSet.Count == 0)
            {
                conditionSet = null;
            }

            return(m_conditions.Remove(Tuples.Create(conditionSet, value)));
        }
예제 #2
0
        public bool Add(ConditionSet conditionSet, T value)
        {
            if (conditionSet != null && conditionSet.Count == 0)
            {
                conditionSet = null;
            }

            return(m_conditions.Add(Tuples.Create(conditionSet, value)));
        }
        public override bool Equals(object obj)
        {
            ConditionSet evaluatorSet = obj as ConditionSet;

            if (evaluatorSet == null)
            {
                return(false);
            }

            return(m_conditions.SetEquals(evaluatorSet.m_conditions));
        }
        public ConditionSet Remove(Condition condition)
        {
            if (m_conditions == null || !m_conditions.Contains(condition))
            {
                return(this);
            }

            var c = new ConditionSet(Quantifier, m_conditions);

            if (m_conditions != null)
            {
                c.m_conditions.Remove(condition);
            }
            return(c);
        }