示例#1
0
 internal ValidObject(string name, string value)
 {
     this.name        = name;
     this.value       = value;
     this.validResult = new ValidResult();
     this.isDirty     = false;
 }
示例#2
0
        public static ValidResult operator +(ValidResult result1, ValidResult result2)
        {
            ValidResult result = new ValidResult();

            foreach (var r in result1)
            {
                if (r.isDirty)
                {
                    result.Add(r);
                }
            }
            foreach (var r in result2)
            {
                if (r.isDirty)
                {
                    result.Add(r);
                }
            }
            if (result.Count > 0)
            {
                result.isDirty = true;
            }
            return(result);
        }