Пример #1
0
        /// <summary>
        /// Adds a rule to the attribute</summary>
        /// <param name="rule">Rule, constraining the attribute value</param>
        public void AddRule(AttributeRule rule)
        {
            if (rule == null)
                throw new ArgumentNullException("rule");

            if (m_rules == null)
                m_rules = new List<AttributeRule>();
            m_rules.Add(rule);
        }
Пример #2
0
        /// <summary>
        /// Adds a rule to the attribute type</summary>
        /// <param name="rule">Rule, constraining the attribute value</param>
        public void AddRule(AttributeRule rule)
        {
            if (rule == null)
            {
                throw new ArgumentNullException("rule");
            }

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