Exemplo n.º 1
0
        public void ReadTransitionalState(TransitionalState state)
        {
            ReadEnterableState(state);

            state.Initial = ReadAttributeValue <string>("initial", null);

            foreach (XmlNode child in FilterChildNodeType(FSMNamespace))
            {
                ReadStartNode(child);
                switch (child.LocalName)
                {
                case "transition":
                    state.AddTransition(ReadTransition());
                    break;

                //case "onInitial":
                //    state.OnInitial = ReadStateOnInitial();
                //    break;
                case "entry":
                    state.EntryState = ReadEntryState();
                    break;

                case "exit":
                    state.ExitState = ReadExitState();
                    break;

                case "state":
                    state.AddChild(ReadState());
                    break;

                case "parallel":
                    state.AddChild(ReadParallelState());
                    break;
                }
                ReadEndNode();
            }
        }
Exemplo n.º 2
0
 public static TransitionalState SetNextState(
     this TransitionalState transitionalState, IState nextState)
 {
     transitionalState.NextState = nextState;
     return(transitionalState);
 }