public IStateBehaviour <TState, TInput> ExecuteOnExit(params Action <object>[] actions) { foreach (var action in actions) { _source.AddExitAction(_context.Factory.CreateActionHolder(action)); } return(this); }
private void RegisterStateExitActions(IState <TState, TInput> state) { var actions = GetEntryOrExitActions(state, state.GetType(), typeof(StateExitActionAttribute)); foreach (var action in actions) { var actionToInvoke = action; state.AddExitAction(_context.Factory .CreateActionHolder(param => actionToInvoke.Invoke(state, new object[] { param }))); } }