public void Insert(int index, PairwiseIfThenConstraint constraint)
        {
            if (constraint == null)
            {
                throw new ArgumentNullException("constraint");
            }

            InnerList.Insert(index, constraint);
        }
        public int IndexOf(PairwiseIfThenConstraint constraint)
        {
            if (constraint == null)
            {
                throw new ArgumentNullException("constraint");
            }

            return(InnerList.IndexOf(constraint));
        }
        public bool Contains(PairwiseIfThenConstraint constraint)
        {
            if (constraint == null)
            {
                throw new ArgumentNullException("constraint");
            }

            return(InnerList.Contains(constraint));
        }
        public void Remove(PairwiseIfThenConstraint constraint)
        {
            if (constraint == null)
            {
                throw new ArgumentNullException("constraint");
            }

            InnerList.Remove(constraint);
        }
        protected override void OnValidate(object value)
        {
            base.OnValidate(value);

            PairwiseIfThenConstraint constraint = value as PairwiseIfThenConstraint;

            if (constraint == null)
            {
                throw new ArgumentException("PairwiseIfThenConstraint");
            }
        }
Пример #6
0
 public override object Visit(PairwiseIfThenConstraint constraint)
 {
     if (constraint.ElsePart == null)
     {
         return(GetComment(constraint) + string.Format("IF {0} THEN {1};", constraint.IfPart.Accept(this), constraint.ThenPart.Accept(this)));
     }
     else
     {
         return(GetComment(constraint) + string.Format("IF {0} THEN {1} ELSE {2};", constraint.IfPart.Accept(this), constraint.ThenPart.Accept(this), constraint.ElsePart.Accept(this)));
     }
 }
Пример #7
0
 public void Add(PairwiseIfThenConstraint constraint)
 {
     this.ifThenConstraints.Add(constraint);
 }
Пример #8
0
 public abstract object Visit(PairwiseIfThenConstraint constraint);