|
| 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.- Parameters
-
- Exceptions
-
| ArgumentNullException | innerRule is null. |
|
| | RuleContext (ApplicationContext applicationContext, Action< IRuleContext > completeHandler, IBusinessRuleBase rule, object? target, Dictionary< IPropertyInfo, object?> inputPropertyValues, RuleContextModes executeContext=RuleContextModes.PropertyChanged) |
| | Creates a RuleContext instance for unit tests.
|
| IRuleContext | GetChainedContext (IBusinessRuleBase rule) |
| | Gets a new RuleContext object for a chained rule.- Parameters
-
| 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.
|
| void | AddErrorResult (string description) |
| | Add a Error severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| void | AddErrorResult (string description, bool stopProcessing) |
| | Add a Error severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| 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.- Parameters
-
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| 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. |
|
| void | AddWarningResult (string description) |
| | Add a Warning severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| void | AddWarningResult (string description, bool stopProcessing) |
| | Add a Warning severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| 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.- Parameters
-
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| 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. |
|
| void | AddInformationResult (string description) |
| | Add an Information severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| void | AddInformationResult (string description, bool stopProcessing) |
| | Add an Information severity result to the Results list.- Parameters
-
| description | Human-readable description of why the rule failed. |
| stopProcessing | True if no further rules should be processed for the current property. |
- Exceptions
-
| ArgumentException | description is null, string.Empty or only consists of white spaces. |
|
| 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.- Parameters
-
| property | Property to which the result applies. |
| description | Human-readable description of why the rule failed. |
- Exceptions
-
| 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. |
|
| void | AddSuccessResult (bool stopProcessing) |
| | Add a Success severity result to the Results list.- Parameters
-
| stopProcessing | True if no further rules should be processed for the current property. |
|
| void | AddOutValue (object? value) |
| | Add an outbound value to update the rule's primary property on the business object once the rule is complete.- Parameters
-
- Exceptions
-
|
| void | AddOutValue (IPropertyInfo property, object? value) |
| | Add an outbound value to update a property on the business object once the rule is complete.- Parameters
-
| property | Property to update. |
| value | New property value. |
- Exceptions
-
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | When property is not defined in AffectedProperties list. |
|
| void | AddDirtyProperty (IPropertyInfo property) |
| | Adds a property name as a dirty field (changed value).- Parameters
-
- Exceptions
-
| ArgumentNullException | property is null. |
| System.ArgumentOutOfRangeException | |
|
| 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.- Template Parameters
-
- Parameters
-
| propertyInfo | The property info. |
- Exceptions
-
| ArgumentNullException | propertyInfo is null. |
|
| T? | GetInputValue< T > (IPropertyInfo propertyInfo) |
| | Gets the value with explicit cast.- Template Parameters
-
- Parameters
-
| propertyInfo | The generic property info. |
- Exceptions
-
| ArgumentNullException | propertyInfo is null. |
|
| 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.- Template Parameters
-
- Parameters
-
| propertyInfo | The generic property info. |
| value | The value. |
- Returns
- true if value exists else false
- Exceptions
-
| ArgumentNullException | propertyInfo is null. |
|
| 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.- Template Parameters
-
- Parameters
-
| propertyInfo | The generic property info. |
| value | The value. |
- Returns
- true if value exists else false
- Exceptions
-
| ArgumentNullException | propertyInfo is null. |
|
Context information provided to a business rule when it is invoked.