public void AddTransiction(Transiction t) { if (!HasTransiction(t)) { Transictions.Add(t); } }
private bool HasTransiction(Transiction transiction) { foreach (Transiction t in Transictions) { if (t.EventName == transiction.EventName) { return(true); } } return(false); }
private void ParseTransition(INode node, XmlNode element) { string eventName = element.Attributes["eventName"].Value; string label = element.Attributes["label"].Value; string nodeRef = element.Attributes["ref"].Value; Transiction transiction = new Transiction(eventName, label); if (CurrentProcess.HasNode(nodeRef)) { CurrentProcess.GetNode(nodeRef).AddTransiction(transiction); } else { if (!unresolved.ContainsKey(nodeRef)) { unresolved[nodeRef] = new List <Transiction>(); } unresolved[nodeRef].Add(transiction); } }
private bool HasTransiction( Transiction transiction) { foreach (Transiction t in Transictions) { if (t.EventName == transiction.EventName) { return true; } } return false; }
public void AddTransiction(Transiction t) { if( !HasTransiction(t) ) { Transictions.Add( t ); } }
private bool HasTransiction(List<Transiction> transictions, Transiction transiction) { return transictions.FindAll(delegate(Transiction t){ return t.EventName == transiction.EventName; }).Count != 0; /* foreach (Transiction t in transictions) { if (t.EventName == transiction.EventName) { return true; } } return false;*/ }
private void ParseTransition( INode node, XmlNode element ) { string eventName = element.Attributes["eventName"].Value; string label = element.Attributes["label"].Value; string nodeRef = element.Attributes["ref"].Value; Transiction transiction = new Transiction(eventName, label); if (CurrentProcess.HasNode(nodeRef)) { CurrentProcess.GetNode(nodeRef).AddTransiction(transiction); }else{ if (!unresolved.ContainsKey(nodeRef)) { unresolved[nodeRef] = new List<Transiction>(); } unresolved[nodeRef].Add( transiction ); } }