示例#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);
 }