public void Bind(IFellow fellow) { if (IsBound) { FloomeenException.Raise(_machineName, "AlreadyBound"); } BoundFellow = new Fellow(fellow, _machineName); if (!BoundFellow.IsSet()) { FloomeenException.Raise(_machineName, "CannotBindFellowBecauseNotSet.TryPlugging"); } BoundFellow.CheckMachineType(); Flow.StatesContains(BoundFellow.State); }
public void Plug(IFellow fellow) { if (IsBound) { FloomeenException.Raise(_machineName, "AlreadyBound"); } BoundFellow = new Fellow(fellow, _machineName); if (BoundFellow.IsSet()) { FloomeenException.Raise(_machineName, "CannotPlugFellowBecauseAlreadySet.TryBinding"); } var startState = Flow.StartState(); BoundFellow.Plug(_machineName, startState); EnterNewState(startState, CreateContext()); }