public void CreateRelation(FlowElement origin, FlowElement destination) { Relation relation = new Relation(); relation.origin = origin; relation.destination = destination; relations.Add(relation); }
public List <FlowElement> GetNextElements(FlowElement element) { List <FlowElement> nextElements = new List <FlowElement>(); foreach (Relation relation in relations) { if (relation.origin == element) { nextElements.Add(relation.destination); } } return(nextElements); }
public List <FlowElement> GetPreviousElements(FlowElement element) { List <FlowElement> previousElements = new List <FlowElement>(); foreach (Relation relation in relations) { if (relation.destination == element) { previousElements.Add(relation.origin); } } return(previousElements); }
public void AddElement(FlowElement element) { elements.Add(element); }