![]() |
CSLA .NET 10.0.0
A home for your business logic
|
Context information provided to a business rule when it is invoked. More...
Public Member Functions | |
| void | ExecuteRule (IBusinessRuleBase innerRule) |
| Executes the inner rule from the outer rules context. Creates a chained context and if CanRunRule will execute the inner rule. | |
| IRuleContext | GetChainedContext (IBusinessRuleBase rule) |
| Gets a new RuleContext object for a chained rule. | |
| void | AddErrorResult (string description) |
| Add a Error severity result to the Results list. | |
| void | AddErrorResult (string description, bool stopProcessing) |
| Add a Error severity result to the Results list. | |
| void | AddErrorResult (IPropertyInfo property, string description) |
| Add a Error severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field. | |
| void | AddWarningResult (string description) |
| Add a Warning severity result to the Results list. | |
| void | AddWarningResult (string description, bool stopProcessing) |
| Add a Warning severity result to the Results list. | |
| void | AddWarningResult (IPropertyInfo property, string description) |
| Add a Warning severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field. | |
| void | AddInformationResult (string description) |
| Add an Information severity result to the Results list. | |
| void | AddInformationResult (string description, bool stopProcessing) |
| Add an Information severity result to the Results list. | |
| void | AddInformationResult (IPropertyInfo property, string description) |
| Add an Information severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field. | |
| void | AddSuccessResult (bool stopProcessing) |
| Add a Success severity result to the Results list. | |
| void | AddOutValue (object? value) |
| Add an outbound value to update the rule's primary property on the business object once the rule is complete. | |
| void | AddOutValue (IPropertyInfo property, object? value) |
| Add an outbound value to update a property on the business object once the rule is complete. | |
| void | AddDirtyProperty (IPropertyInfo property) |
| Adds a property name as a dirty field (changed value). | |
| void | Complete () |
| Indicates that the rule processing is complete, so CSLA .NET will process the Results list. This method must be invoked on the UI thread. | |
| T? | GetInputValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > (PropertyInfo< T > propertyInfo) |
| Gets the value. | |
| T? | GetInputValue< T > (IPropertyInfo propertyInfo) |
| Gets the value with explicit cast. | |
| bool | TryGetInputValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > (PropertyInfo< T > propertyInfo, ref T? value) |
| Tries to get the value. Use this method on LazyLoaded properties to test if value has been provided or not. | |
| bool | TryGetInputValue< T > (IPropertyInfo propertyInfo, ref T? value) |
| Tries to get the value with explicit cast. Use this method on LazyLoaded properties to test if value has been provided or not. | |
Properties | |
| IBusinessRuleBase | Rule [get] |
| Gets the rule object. | |
| object? | Target [get] |
| Gets a reference to the target business object. | |
| Dictionary< IPropertyInfo, object?> | InputPropertyValues [get] |
| Gets a dictionary containing copies of property values from the target business object. | |
| List< IPropertyInfo > | DirtyProperties [get] |
| Gets a list of dirty properties (value was updated). | |
| Dictionary< IPropertyInfo, object?> | OutputPropertyValues [get] |
| Gets a dictionary containing copies of property values that should be updated in the target object. | |
| List< RuleResult > | Results [get] |
| Gets a list of RuleResult objects containing the results of the rule. | |
| string | OriginPropertyName [get] |
| Gets or sets the name of the origin property. | |
| bool | IsCascadeContext [get] |
| Gets a value indicating whether this instance is cascade context as a result of AffectedProperties. | |
| bool | IsPropertyChangedContext [get] |
| Gets a value indicating whether this instance is property changed context. | |
| bool | IsCheckRulesContext [get] |
| Gets a value indicating whether this instance is check rules context. | |
| bool | IsCheckObjectRulesContext [get] |
| Gets a value indicating whether this instance is check object rules context. | |
| RuleContextModes | ExecuteContext [get] |
| Gets the execution context. | |
| ApplicationContext | ApplicationContext [get] |
| Gets a reference to the current ApplicationContext. | |
| IDataPortalFactory | DataPortalFactory [get] |
| Gets a data portal factory instance. | |
Context information provided to a business rule when it is invoked.
| void Csla.Rules.IRuleContext.AddDirtyProperty | ( | IPropertyInfo | property | ) |
Adds a property name as a dirty field (changed value).
| property | The property. |
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddErrorResult | ( | IPropertyInfo | property, |
| string | description ) |
Add a Error severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field.
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | When property is not defined in AffectedProperties list. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddErrorResult | ( | string | description | ) |
Add a Error severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddErrorResult | ( | string | description, |
| bool | stopProcessing ) |
Add a Error severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddInformationResult | ( | IPropertyInfo | property, |
| string | description ) |
Add an Information severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field.
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | When property is not defined in AffectedProperties list. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddInformationResult | ( | string | description | ) |
Add an Information severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddInformationResult | ( | string | description, |
| bool | stopProcessing ) |
Add an Information severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddOutValue | ( | IPropertyInfo | property, |
| object? | value ) |
Add an outbound value to update a property on the business object once the rule is complete.
| property | Property to update. |
| value | New property value. |
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | When property is not defined in AffectedProperties list. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddOutValue | ( | object? | value | ) |
Add an outbound value to update the rule's primary property on the business object once the rule is complete.
| value | New property value. |
| InvalidOperationException | Rule.IBusinessRuleBase.PrimaryProperty is null. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddSuccessResult | ( | bool | stopProcessing | ) |
Add a Success severity result to the Results list.
| stopProcessing | True if no further rules should be processed for the current property. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddWarningResult | ( | IPropertyInfo | property, |
| string | description ) |
Add a Warning severity result to the Results list. This method is only allowed on "object" level rules to allow an object level rule to set warning result on a field.
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | When property is not defined in AffectedProperties list. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddWarningResult | ( | string | description | ) |
Add a Warning severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.AddWarningResult | ( | string | description, |
| bool | stopProcessing ) |
Add a Warning severity result to the Results list.
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.Complete | ( | ) |
Indicates that the rule processing is complete, so CSLA .NET will process the Results list. This method must be invoked on the UI thread.
Implemented in Csla.Rules.RuleContext.
| void Csla.Rules.IRuleContext.ExecuteRule | ( | IBusinessRuleBase | innerRule | ) |
Executes the inner rule from the outer rules context. Creates a chained context and if CanRunRule will execute the inner rule.
| innerRule | The inner rule. |
| ArgumentNullException | innerRule is null. |
Implemented in Csla.Rules.RuleContext.
| IRuleContext Csla.Rules.IRuleContext.GetChainedContext | ( | IBusinessRuleBase | rule | ) |
Gets a new RuleContext object for a chained rule.
| rule | Chained rule that will use this new context. |
The properties from the existing RuleContext will be used to create the new context, with the exception of the Rule property which is set using the supplied IBusinessRule value.
| ArgumentNullException | rule is null. |
Implemented in Csla.Rules.RuleContext.
| T? Csla.Rules.IRuleContext.GetInputValue< T > | ( | IPropertyInfo | propertyInfo | ) |
Gets the value with explicit cast.
| T |
| propertyInfo | The generic property info. |
| ArgumentNullException | propertyInfo is null. |
Implemented in Csla.Rules.RuleContext.
| T? Csla.Rules.IRuleContext.GetInputValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > | ( | PropertyInfo< T > | propertyInfo | ) |
Gets the value.
| T |
| propertyInfo | The property info. |
| ArgumentNullException | propertyInfo is null. |
Implemented in Csla.Rules.RuleContext.
| bool Csla.Rules.IRuleContext.TryGetInputValue< T > | ( | IPropertyInfo | propertyInfo, |
| ref T? | value ) |
Tries to get the value with explicit cast. Use this method on LazyLoaded properties to test if value has been provided or not.
| T |
| propertyInfo | The generic property info. |
| value | The value. |
| ArgumentNullException | propertyInfo is null. |
Implemented in Csla.Rules.RuleContext.
| bool Csla.Rules.IRuleContext.TryGetInputValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > | ( | PropertyInfo< T > | propertyInfo, |
| ref T? | value ) |
Tries to get the value. Use this method on LazyLoaded properties to test if value has been provided or not.
| T |
| propertyInfo | The generic property info. |
| value | The value. |
| ArgumentNullException | propertyInfo is null. |
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a reference to the current ApplicationContext.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a data portal factory instance.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a list of dirty properties (value was updated).
The dirty properties.
Implemented in Csla.Rules.RuleContext.
|
get |
|
get |
Gets a dictionary containing copies of property values from the target business object.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a value indicating whether this instance is cascade context as a result of AffectedProperties.
true if this instance is cascade context; otherwise, false.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a value indicating whether this instance is check object rules context.
true if this instance is check object rules context; otherwise, false.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a value indicating whether this instance is check rules context.
true if this instance is check rules context; otherwise, false.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a value indicating whether this instance is property changed context.
true if this instance is property changed context; otherwise, false.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets or sets the name of the origin property.
The name of the origin property.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a dictionary containing copies of property values that should be updated in the target object.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a list of RuleResult objects containing the results of the rule.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets the rule object.
Implemented in Csla.Rules.RuleContext.
|
get |
Gets a reference to the target business object.
Implemented in Csla.Rules.RuleContext.