예제 #1
0
파일: State.cs 프로젝트: nhannhan159/PAT
        public void AddTransition(Transition tran)
        {
            if (OutgoingTransitions == null)
            {
                OutgoingTransitions = new List<Transition>();
            }

            OutgoingTransitions.Add(tran);
        }
예제 #2
0
 /// <summary>
 /// Remove transition for list and its source state's outgoing list
 /// </summary>
 /// <param name="toRemove"></param>
 public void RemoveTransition(Transition toRemove)
 {
     Transitions.Remove(toRemove);
     toRemove.FromState.OutgoingTransitions.Remove(toRemove);
     toRemove.ToState.IncomingTransition.Remove(toRemove);
 }
예제 #3
0
 public void AddTransition(Transition toAdd)
 {
     Transitions.Add(toAdd);
     toAdd.FromState.OutgoingTransitions.Add(toAdd);
     toAdd.ToState.IncomingTransition.Add(toAdd);
 }