예제 #1
0
 /// <summary>Check rules for this property name.</summary>
 public virtual void CheckRules(string pPropertyName)
 {
     if (String.IsNullOrEmpty(pPropertyName))
     {
         return;
     }
     BrokenRuleManager.CheckRules(pPropertyName);
 }
예제 #2
0
        [System.Diagnostics.DebuggerHidden()] // Let client catch exceptions
        protected virtual void ValidateForBrokenRules()
        {
            BrokenRuleManager.CheckRules();
            if (IsValid)
            {
                return;
            }

            ValidationResult vr =
                new ValidationResult(false, "Failed validation", ValidationSeverity.Error);

            throw new ValidationException(ValidationErrorType.BrokenRules, this, vr);
        }
예제 #3
0
        /// <summary>Check all rules for this object.</summary>
        public virtual void CheckRules()
        {
            // Don't check if deleted or detached

            BrokenRuleManager.CheckRules();
        }