CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Rules.BusinessRuleAsync Class Reference

Base class used to create async business and validation rules. More...

Inheritance diagram for Csla.Rules.BusinessRuleAsync:
Csla.Rules.BusinessRuleBase Csla.Rules.IBusinessRuleAsync Csla.Rules.IBusinessRuleBase Csla.Rules.IBusinessRuleBase Csla.Analyzers.IntegrationTests.AsynchronousRuleNewSchool Csla.Analyzers.IntegrationTests.CallingComplete Csla.Analyzers.IntegrationTests.CallingCompleteWithNameof Csla.Rules.ObjectRuleAsync Csla.Rules.PropertyRuleAsync Csla.Testing.Business.BusyStatus.ItemWithAsynchRule.TwoSecondsLongRule Csla.Test.ValidationRules.LookupCustomer

Protected Member Functions

 BusinessRuleAsync ()
 Creates an instance of the rule that applies to a business object as a whole. More...
 
 BusinessRuleAsync (Csla.Core.IPropertyInfo primaryProperty)
 Creates an instance of the rule that applies to a specfic property. More...
 
virtual Task ExecuteAsync (IRuleContext context)
 Business or validation rule implementation. 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...
 

Properties

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.IPropertyInfoAffectedProperties [get]
 Gets a list of properties affected by this rule. More...
 
List< Csla.Core.IPropertyInfoInputProperties [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.IPropertyInfoInputProperties [get]
 Gets a list of secondary property values to be supplied to the rule when it is executed. More...
 
List< Csla.Core.IPropertyInfoAffectedProperties [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...
 

Additional Inherited Members

Detailed Description

Base class used to create async business and validation rules.

Definition at line 21 of file BusinessRuleAsync.cs.

Constructor & Destructor Documentation

◆ BusinessRuleAsync() [1/2]

Csla.Rules.BusinessRuleAsync.BusinessRuleAsync ( )
protected

Creates an instance of the rule that applies to a business object as a whole.

Definition at line 37 of file BusinessRuleAsync.cs.

◆ BusinessRuleAsync() [2/2]

Csla.Rules.BusinessRuleAsync.BusinessRuleAsync ( Csla.Core.IPropertyInfo  primaryProperty)
protected

Creates an instance of the rule that applies to a specfic property.

Parameters
primaryPropertyPrimary property for this rule.

Definition at line 46 of file BusinessRuleAsync.cs.

Member Function Documentation

◆ ExecuteAsync()

virtual Task Csla.Rules.BusinessRuleAsync.ExecuteAsync ( IRuleContext  context)
protectedvirtual

Property Documentation

◆ IsAsync

override bool Csla.Rules.BusinessRuleAsync.IsAsync
getprotected set

Gets a value indicating whether the rule will run on a background thread.

Definition at line 27 of file BusinessRuleAsync.cs.