/// <summary>Check rules for this property name.</summary> public virtual void CheckRules(string pPropertyName) { if (String.IsNullOrEmpty(pPropertyName)) { return; } BrokenRuleManager.CheckRules(pPropertyName); }
[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); }
/// <summary>Check all rules for this object.</summary> public virtual void CheckRules() { // Don't check if deleted or detached BrokenRuleManager.CheckRules(); }