9using System.Collections.Generic;
22 private bool _provideTargetWhenAsync;
23 private int _priority;
38 get {
return _primaryProperty; }
42 _primaryProperty = value;
44 if (_primaryProperty !=
null)
66 public abstract bool IsAsync {
get;
protected set; }
75 get {
return _provideTargetWhenAsync; }
79 _provideTargetWhenAsync = value;
95 get {
return _ruleUri; }
108 get {
return _priority; }
122 get {
return _runMode; }
174 if (obj is Core.IManageProperties target)
175 target.LoadProperty(propertyInfo, newValue);
193 if (obj is Core.IManageProperties target)
194 return target.ReadProperty(propertyInfo);
A strongly-typed resource class, for looking up localized strings, etc.
static string IManagePropertiesRequiredException
Looks up a localized string similar to Target object must implement IManageProperties.
static string PropertySetNotAllowed
Looks up a localized string similar to Property set not allowed.
Base class used to create business and validation rules.
void CanWriteProperty(string argument)
Allows or blocks changing a property value.
virtual Csla.Core.IPropertyInfo PrimaryProperty
Gets or sets the primary property affected by this rule.
object ReadProperty(object obj, Csla.Core.IPropertyInfo propertyInfo)
Reads a property's field value.
void LoadProperty(object obj, Csla.Core.IPropertyInfo propertyInfo, object newValue)
Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does...
bool ProvideTargetWhenAsync
Gets a value indicating that the Target property should be set even for an async rule (note that usin...
BusinessRuleBase(Csla.Core.IPropertyInfo primaryProperty)
Creates an instance of the rule that applies to a specfic property.
string RuleName
Gets a unique rule:// URI for the specific instance of the rule within the context of the business ob...
int Priority
Gets the rule priority.
RunModes RunMode
Gets or sets the run in context.
List< Csla.Core.IPropertyInfo > InputProperties
Gets a list of secondary property values to be supplied to the rule when it is executed.
bool PropertiesLocked
Gets or sets a value indicating whether property values should be locked because an async operation i...
List< Csla.Core.IPropertyInfo > AffectedProperties
Gets a list of properties affected by this rule.
abstract bool IsAsync
Gets a value indicating whether the rule will run on a background thread.
RuleUri RuleUri
Sets or gets the rule:// URI object for this rule.
Parses a rule:// URI to provide easy access to the parts of the URI.
override string ToString()
Gets a string representation of the rule URI.
Maintains metadata about a property.
Interface defining a business/validation rule implementation.
RunModes
Flags enum to define when rule is allowed or denied to run