using System;
using System.Collections.Generic;
using System.Text;
namespace Csla.Validation
{
///
/// Stores details about a specific broken business rule.
///
[Serializable()]
public class BrokenRule
{
private string _ruleName;
private string _description;
private string _property;
private RuleSeverity _severity;
internal BrokenRule(IRuleMethod rule)
{
_ruleName = rule.RuleName;
_description = rule.RuleArgs.Description;
_property = rule.RuleArgs.PropertyName;
_severity = rule.RuleArgs.Severity;
}
///
/// Provides access to the name of the broken rule.
///
/// The name of the rule.
public string RuleName
{
get { return _ruleName; }
}
///
/// Provides access to the description of the broken rule.
///
/// The description of the rule.
public string Description
{
get { return _description; }
}
///
/// Provides access to the property affected by the broken rule.
///
/// The property affected by the rule.
public string Property
{
get { return _property; }
}
///
/// Gets the severity of the broken rule.
///
///
///
///
public RuleSeverity Severity
{
get { return _severity; }
}
}
}