9using System.Collections.Generic;
25 private Dictionary<string, object> _decorations;
27 #region Base Constructors
36 _decorations =
new Dictionary<string, object>();
46 _decorations =
new Dictionary<string, object>();
57 : base(propertyName, friendlyName)
59 _decorations =
new Dictionary<string, object>();
81 : base(propertyName, severity)
83 _decorations =
new Dictionary<string, object>();
105 : base(propertyInfo, severity)
107 _decorations =
new Dictionary<string, object>();
132 : base(propertyName, friendlyName, severity)
134 _decorations =
new Dictionary<string, object>();
160 : base(propertyName, severity, stopProcessing)
162 _decorations =
new Dictionary<string, object>();
188 : base(propertyInfo, severity, stopProcessing)
190 _decorations =
new Dictionary<string, object>();
219 : base(propertyName, friendlyName, severity, stopProcessing)
221 _decorations =
new Dictionary<string, object>();
259 public DecoratedRuleArgs(
string propertyName,
string friendlyName, Dictionary<string, object> args)
260 : base(propertyName, friendlyName)
286 : base(propertyName, severity)
312 : base(propertyInfo, severity)
341 : base(propertyName, friendlyName, severity)
371 : base(propertyName, severity, stopProcessing)
401 : base(propertyInfo, severity, stopProcessing)
434 : base(propertyName, friendlyName, severity, stopProcessing)
445 public object this[
string key]
449 object result =
null;
450 if (_decorations.TryGetValue(key, out result))
457 _decorations[key] = value;
468 StringBuilder sb =
new StringBuilder();
469 sb.Append(base.ToString());
470 if (_decorations.Count > 0)
474 foreach (System.Collections.Generic.KeyValuePair<
string,
object> item in _decorations)
480 if (item.Key !=
null)
482 var itemString = Uri.EscapeDataString(item.Key);
484 if (item.Value ==
null)
485 valueString =
string.Empty;
487 valueString = Uri.EscapeDataString(item.Value.ToString());
488 sb.AppendFormat(
"{0}={1}", itemString, valueString);
492 return sb.ToString();
Object providing extra information to methods that implement business rules.
DecoratedRuleArgs(string propertyName)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
Creates an instance of RuleArgs.
override string ToString()
Return a string representation of the object using the rule:// URI format.
DecoratedRuleArgs(string propertyName, string friendlyName)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, string friendlyName, RuleSeverity severity)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, RuleSeverity severity, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, string friendlyName, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, string friendlyName, RuleSeverity severity, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, RuleSeverity severity)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
Creates an instance of RuleArgs.
DecoratedRuleArgs(Core.IPropertyInfo propertyInfo)
Creates an instance of RuleArgs.
DecoratedRuleArgs(string propertyName, RuleSeverity severity, bool stopProcessing)
Creates an instance of RuleArgs.
Object providing extra information to methods that implement business rules.
RuleSeverity
Values for validation rule severities.