Exemple #1
0
        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);
        }
Exemple #2
0
        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());
        }
Exemple #3
0
 public void Unbind()
 {
     BoundFellow = null;
 }