コード例 #1
0
        public void CreateRelation(FlowElement origin, FlowElement destination)
        {
            Relation relation = new Relation();

            relation.origin      = origin;
            relation.destination = destination;

            relations.Add(relation);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void AddElement(FlowElement element)
 {
     elements.Add(element);
 }