Example #1
0
        /// <summary>
        /// Adds a rule to the child type. All the rules' Validate methods must return true
        /// in order for this ChildInfo's Validate to return true.</summary>
        /// <param name="rule">Rule, constraining the child</param>
        public void AddRule(ChildRule rule)
        {
            if (rule == null)
                throw new ArgumentNullException("rule");

            if (m_rules == null)
                m_rules = new List<ChildRule>(1);
            m_rules.Add(rule);
        }
Example #2
0
        /// <summary>
        /// Adds a rule to the child type. All the rules' Validate methods must return true
        /// in order for this ChildInfo's Validate to return true.</summary>
        /// <param name="rule">Rule, constraining the child</param>
        public void AddRule(ChildRule rule)
        {
            if (rule == null)
            {
                throw new ArgumentNullException("rule");
            }

            if (m_rules == null)
            {
                m_rules = new List <ChildRule>(1);
            }
            m_rules.Add(rule);
        }