public WhenFormulaChangesBuilder <T> From(Expression <Func <T, T> > sourceExpression, Action <Exception> onError, string nodeId = null) { ISourceDefinition <T> sourceDefinition; if (sourceExpression.IsWritable()) { sourceDefinition = CreateMemberDefinition(sourceExpression, nodeId, true, true); } else { sourceDefinition = CreateFormulaDefinition(sourceExpression, nodeId, true); } engine.AddExpression(sourceDefinition, targetMemberDefinition, onError); return(new WhenFormulaChangesBuilder <T>(sourceExpression, nodeId, engine)); }
public void Do(Expression <Action <T> > action, Action <Exception> onError, string actionId = null) { dependencyEngine.AddExpression(sourceDefinition, new ActionDefinition <T>(action, actionId), onError); }