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

Base class for a property rule More...

Inheritance diagram for Csla.Rules.PropertyRuleAsync:
Csla.Rules.BusinessRuleAsync Csla.Rules.BusinessRuleBase Csla.Rules.IBusinessRuleAsync Csla.Rules.IBusinessRuleBase Csla.Rules.IBusinessRuleBase

Protected Member Functions

virtual string GetMessage ()
 Gets the error message text. More...
 
 PropertyRuleAsync ()
 Initializes a new instance of the PropertyRule class. More...
 
 PropertyRuleAsync (IPropertyInfo propertyInfo)
 Initializes a new instance of the PropertyRule class. More...
 
- Protected Member Functions inherited from Csla.Rules.BusinessRuleAsync
 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

string MessageText [getset]
 Gets or sets the error message (constant). More...
 
Func< string > MessageDelegate [getset]
 Gets or sets the error message function for this rule. More...
 
bool HasMessageDelegate [get]
 Gets a value indicating whether this instance has message delegate. More...
 
bool CanRunAsAffectedProperty [getset]
 Gets or sets a value indicating whether this instance can run as affected property. More...
 
bool CanRunOnServer [getset]
 Gets or sets a value indicating whether this instance can run in logical serverside data portal. More...
 
bool CanRunInCheckRules [getset]
 Gets or sets a value indicating whether this instance can run when CheckRules is called on BO. More...
 
- Properties inherited from Csla.Rules.BusinessRuleAsync
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 for a property rule

Definition at line 16 of file PropertyRuleAsync.cs.

Constructor & Destructor Documentation

◆ PropertyRuleAsync() [1/2]

Csla.Rules.PropertyRuleAsync.PropertyRuleAsync ( )
protected

Initializes a new instance of the PropertyRule class.

Definition at line 56 of file PropertyRuleAsync.cs.

◆ PropertyRuleAsync() [2/2]

Csla.Rules.PropertyRuleAsync.PropertyRuleAsync ( IPropertyInfo  propertyInfo)
protected

Initializes a new instance of the PropertyRule class.

Parameters
propertyInfoThe property info.

Definition at line 68 of file PropertyRuleAsync.cs.

Member Function Documentation

◆ GetMessage()

virtual string Csla.Rules.PropertyRuleAsync.GetMessage ( )
protectedvirtual

Gets the error message text.

Returns

Definition at line 48 of file PropertyRuleAsync.cs.

Property Documentation

◆ CanRunAsAffectedProperty

bool Csla.Rules.PropertyRuleAsync.CanRunAsAffectedProperty
getset

Gets or sets a value indicating whether this instance can run as affected property.

true if this instance can run as affected property; otherwise, false.

Definition at line 81 of file PropertyRuleAsync.cs.

◆ CanRunInCheckRules

bool Csla.Rules.PropertyRuleAsync.CanRunInCheckRules
getset

Gets or sets a value indicating whether this instance can run when CheckRules is called on BO.

true if this instance can run when CheckRules is called; otherwise, false.

Definition at line 125 of file PropertyRuleAsync.cs.

◆ CanRunOnServer

bool Csla.Rules.PropertyRuleAsync.CanRunOnServer
getset

Gets or sets a value indicating whether this instance can run in logical serverside data portal.

true if this instance can run logical serverside data portal; otherwise, false.

Definition at line 103 of file PropertyRuleAsync.cs.

◆ HasMessageDelegate

bool Csla.Rules.PropertyRuleAsync.HasMessageDelegate
getprotected

Gets a value indicating whether this instance has message delegate.

true if this instance has message delegate; otherwise, false.

Definition at line 39 of file PropertyRuleAsync.cs.

◆ MessageDelegate

Func<string> Csla.Rules.PropertyRuleAsync.MessageDelegate
getset

Gets or sets the error message function for this rule.

Use this for localizable messages from a resource file.


Definition at line 31 of file PropertyRuleAsync.cs.

◆ MessageText

string Csla.Rules.PropertyRuleAsync.MessageText
getset

Gets or sets the error message (constant).

Definition at line 21 of file PropertyRuleAsync.cs.