示例#1
0
        /// <summary>
        /// 校验属性值
        /// </summary>
        /// <param name="results"></param>
        public void Validate(ValidationResults results)
        {
            results.NullCheck("results");

            if (((List <Validator>) this.Validators).Count > 0)
            {
                object data = GetRealValue();

                this.Validators.ForEach(v => v.Validate(data, results));
            }
        }
示例#2
0
        /// <summary>
        /// 校验属性值
        /// </summary>
        /// <param name="results"></param>
        public void Validate(ValidationResults results)
        {
            results.NullCheck("results");

            if (((List<Validator>)this.Validators).Count > 0)
            {
                object data = GetRealValue();

                this.Validators.ForEach(v => v.Validate(data, results));
            }
        }