9using System.Collections.Generic;
23 private string _propertyName;
24 private string _propertyFriendlyName;
25 private string _description;
27 private bool _stopProcessing;
34 get {
return _propertyName; }
44 get {
return _propertyFriendlyName; }
45 set { _propertyFriendlyName = value; }
61 {
return _description; }
62 set { _description = value; }
76 get {
return _severity; }
77 set { _severity = value; }
93 get {
return _stopProcessing; }
94 set { _stopProcessing = value; }
105 _propertyName = propertyName;
114 : this(propertyInfo.Name)
116 _propertyFriendlyName = propertyInfo.FriendlyName;
126 public RuleArgs(
string propertyName,
string friendlyName)
129 _propertyFriendlyName = friendlyName;
153 _severity = severity;
177 _severity = severity;
202 : this(propertyName, friendlyName)
204 _severity = severity;
230 : this(propertyName, severity)
232 _stopProcessing = stopProcessing;
258 : this(propertyInfo, severity)
260 _stopProcessing = stopProcessing;
289 : this(propertyName, friendlyName, severity)
291 _stopProcessing = stopProcessing;
299 return _propertyName;
315 string propName =
null;
Object providing extra information to methods that implement business rules.
string PropertyFriendlyName
Gets or sets a friendly name for the property, which will be used in place of the property name when ...
RuleArgs(string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
RuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
RuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity)
Creates an instance of RuleArgs.
RuleArgs(string propertyName, string friendlyName)
Creates an instance of RuleArgs.
RuleArgs(string propertyName, RuleSeverity severity)
Creates an instance of RuleArgs.
RuleArgs(string propertyName)
Creates an instance of RuleArgs.
override string ToString()
Returns a string representation of the object.
string Description
Set by the rule handler method to describe the broken rule.
RuleSeverity Severity
Gets or sets the severity of the broken rule.
string PropertyName
The name of the property to be validated.
RuleArgs(Core.IPropertyInfo propertyInfo)
Creates an instance of RuleArgs.
static string GetPropertyName(RuleArgs e)
Gets the property name from the RuleArgs object, using the friendly name if one is defined.
bool StopProcessing
Gets or sets a value indicating whether this broken rule should stop the processing of subsequent rul...
RuleArgs(string propertyName, string friendlyName, RuleSeverity severity)
Creates an instance of RuleArgs.
RuleArgs(string propertyName, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
RuleSeverity
Values for validation rule severities.