A business rule defined by a lambda expression. More...
Public Member Functions | |
Lambda (Action< IRuleContext > rule) | |
Creates an instance of the rule. More... | |
Lambda (Csla.Core.IPropertyInfo primaryProperty, Action< IRuleContext > rule) | |
Creates an instance of the rule. More... | |
void | AddQueryParameter (string key, string value) |
Add a query parameter to make the RuleUri uniques for this rule and primary property. More... | |
Protected Member Functions | |
override void | Execute (IRuleContext context) |
Executes the rule. More... | |
Protected Member Functions inherited from Csla.Rules.BusinessRule | |
BusinessRule () | |
Creates an instance of the rule that applies to a business object as a whole. More... | |
BusinessRule (Csla.Core.IPropertyInfo primaryProperty) | |
Creates an instance of the rule that applies to a specfic property. More... | |
Protected Member Functions inherited from Csla.Rules.BusinessRuleBase | |
void | CanWriteProperty (string argument) |
Allows or blocks changing a property value. More... | |
BusinessRuleBase (Csla.Core.IPropertyInfo primaryProperty) | |
Creates an instance of the rule that applies to a specfic property. More... | |
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 change. More... | |
object | ReadProperty (object obj, Csla.Core.IPropertyInfo propertyInfo) |
Reads a property's field value. More... | |
Additional Inherited Members | |
Properties inherited from Csla.Rules.BusinessRule | |
override bool | IsAsync [getprotected set] |
Gets a value indicating whether the rule will run on a background thread. More... | |
Properties inherited from Csla.Rules.BusinessRuleBase | |
bool | PropertiesLocked [getset] |
Gets or sets a value indicating whether property values should be locked because an async operation is running. More... | |
virtual Csla.Core.IPropertyInfo | PrimaryProperty [getset] |
Gets or sets the primary property affected by this rule. More... | |
List< Csla.Core.IPropertyInfo > | AffectedProperties [get] |
Gets a list of properties affected by this rule. More... | |
List< Csla.Core.IPropertyInfo > | InputProperties [getprotected set] |
Gets a list of secondary property values to be supplied to the rule when it is executed. More... | |
abstract bool | IsAsync [getprotected set] |
Gets a value indicating whether the rule will run on a background thread. More... | |
bool | ProvideTargetWhenAsync [getprotected set] |
Gets a value indicating that the Target property should be set even for an async rule (note that using Target from a background thread will cause major problems). More... | |
string | RuleName [get] |
Gets a unique rule:// URI for the specific instance of the rule within the context of the business object where the rule is used. More... | |
RuleUri | RuleUri [getset] |
Sets or gets the rule:// URI object for this rule. More... | |
int | Priority [getset] |
Gets the rule priority. More... | |
RunModes | RunMode [getset] |
Gets or sets the run in context. More... | |
Properties inherited from Csla.Rules.IBusinessRuleBase | |
List< Csla.Core.IPropertyInfo > | InputProperties [get] |
Gets a list of secondary property values to be supplied to the rule when it is executed. More... | |
List< Csla.Core.IPropertyInfo > | AffectedProperties [get] |
Gets a list of properties affected by this rule. More... | |
Csla.Core.IPropertyInfo | PrimaryProperty [get] |
Gets the primary property affected by this rule. More... | |
string | RuleName [get] |
Gets a unique rule:// URI for the specific instance of the rule within the context of the business object where the rule is used. More... | |
int | Priority [get] |
Gets the rule priority. More... | |
bool | ProvideTargetWhenAsync [get] |
Gets a value indicating that the Target property should be set even for an async rule (note that using Target from a background thread will cause major problems). More... | |
RunModes | RunMode [get] |
Gets the context in which the rule is allowed to execute. More... | |
bool | IsAsync [get] |
Gets a value indicating whether the Execute() method will run asynchronous code. More... | |
A business rule defined by a lambda expression.
Definition at line 691 of file CommonRules.cs.
Csla.Rules.CommonRules.Lambda.Lambda | ( | Action< IRuleContext > | rule | ) |
Creates an instance of the rule.
rule | Rule implementation. |
Definition at line 697 of file CommonRules.cs.
Csla.Rules.CommonRules.Lambda.Lambda | ( | Csla.Core.IPropertyInfo | primaryProperty, |
Action< IRuleContext > | rule | ||
) |
Creates an instance of the rule.
primaryProperty | Primary property for the rule. |
rule | Rule implementation. |
Definition at line 707 of file CommonRules.cs.
void Csla.Rules.CommonRules.Lambda.AddQueryParameter | ( | string | key, |
string | value | ||
) |
Add a query parameter to make the RuleUri uniques for this rule and primary property.
key | The key. |
value | The value. |
Definition at line 725 of file CommonRules.cs.
|
protectedvirtual |
Executes the rule.
context | Rule context. |
Reimplemented from Csla.Rules.BusinessRule.
Definition at line 736 of file CommonRules.cs.