Example #1
0
        protected override void OnValidate(PatternCheckContext context)
        {
            if (Value == null)
            {
                throw new Exception("Pattern has no value");
            }

            Value.Validate(context);
        }
Example #2
0
        public void Validate(PatternCheckContext context)
        {
            if (_checked)
            {
                return;
            }

            // If checking a child causes this element to be
            // checked again, don't get caught in a loop.
            _checked = true;

            OnValidate(context);
        }
Example #3
0
 protected abstract void OnValidate(PatternCheckContext context);