Interface IRightHandSideExpression
Rule's right-hand side (actions) expression builder.
public interface IRightHandSideExpression
Methods
Action(Expression<Action<IContext>>, ActionTrigger)
Defines rule's action that engine executes for a given trigger.
IRightHandSideExpression Action(Expression<Action<IContext>> action, ActionTrigger actionTrigger)
Parameters
action
Expression<Action<IContext>>Action expression.
actionTrigger
ActionTriggerEvents that should trigger this action.
Returns
- IRightHandSideExpression
Right hand side expression builder.
Do(Expression<Action<IContext>>)
Defines rule's action that engine executes when the rule fires due to the initial rule match or due to an update.
IRightHandSideExpression Do(Expression<Action<IContext>> action)
Parameters
action
Expression<Action<IContext>>Action expression.
Returns
- IRightHandSideExpression
Right hand side expression builder.
Undo(Expression<Action<IContext>>)
Defines rule's action that engine executes when the rule fires due to the match removal (provided the rule previously fired on the match).
IRightHandSideExpression Undo(Expression<Action<IContext>> action)
Parameters
action
Expression<Action<IContext>>Action expression.
Returns
- IRightHandSideExpression
Right hand side expression builder.
Yield<TFact>(Expression<Func<IContext, TFact>>)
Defines rule's action that yields a linked fact when the rule fires. If the rule fires due to an update, the linked fact is also updated with the new yielded value.
IRightHandSideExpression Yield<TFact>(Expression<Func<IContext, TFact>> yield)
Parameters
yield
Expression<Func<IContext, TFact>>Action expression that yields the linked fact.
Returns
- IRightHandSideExpression
Right hand side expression builder.
Type Parameters
TFact
Type of fact to yield.
Yield<TFact>(Expression<Func<IContext, TFact>>, Expression<Func<IContext, TFact, TFact>>)
Defines rule's action that yields a linked fact when the rule fires. If the rule fires due to an update, the update expression is evaluated to produce an updated linked fact.
IRightHandSideExpression Yield<TFact>(Expression<Func<IContext, TFact>> yieldInsert, Expression<Func<IContext, TFact, TFact>> yieldUpdate)
Parameters
yieldInsert
Expression<Func<IContext, TFact>>Action expression that yields a new linked fact.
yieldUpdate
Expression<Func<IContext, TFact, TFact>>Action expression that yields an updated linked fact.
Returns
- IRightHandSideExpression
Right hand side expression builder.
Type Parameters
TFact
Type of fact to yield.