Interface IBehaviorRule<TContext>
Non-generic contract for defining a behavior rule.
Namespace: Kephas.Behaviors
Assembly: Kephas.Core.dll
Syntax
public interface IBehaviorRule<in TContext> : IBehaviorRuleFlowControl
Type Parameters
| Name | Description |
|---|---|
| TContext | The context type. |
Methods
| Improve this Doc View SourceCanApply(TContext)
Gets a value indicating whether the rule may be applied or not.
Declaration
bool CanApply(TContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| TContext | context | The context. |
Returns
| Type | Description |
|---|---|
| System.Boolean | A value indicating whether the rule may be applied or not. |
GetValue(TContext)
Gets the behavior value.
Declaration
IBehaviorValue GetValue(TContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| TContext | context | The context. |
Returns
| Type | Description |
|---|---|
| IBehaviorValue | The behavior value. |