public void Bind(State <TInstance> state) { var builder = new ActivityBehaviorBuilder <TInstance>(); foreach (var activity in _activities.GetStateActivityBinders()) { activity.Bind(builder); } var conditionActivity = new ConditionActivity <TInstance>(_condition, builder.Behavior); state.Bind(_event, conditionActivity); }
public void Bind(State <TInstance> state) { var builder = new CatchBehaviorBuilder <TInstance>(); foreach (var activity in _activities.GetStateActivityBinders()) { activity.Bind(builder); } var compensateActivity = new CatchFaultActivity <TInstance, TException>(builder.Behavior); state.Bind(_event, compensateActivity); }
private Behavior <TInstance> GetBehavior(EventActivities <TInstance> activities) { var catchBuilder = new CatchBehaviorBuilder <TInstance>(); foreach (var activity in activities.GetStateActivityBinders()) { activity.Bind(catchBuilder); } return(catchBuilder.Behavior); }
static Behavior <TInstance> GetBehavior(EventActivities <TInstance> activities) { var builder = new ActivityBehaviorBuilder <TInstance>(); foreach (var activity in activities.GetStateActivityBinders()) { activity.Bind(builder); } return(builder.Behavior); }