Beispiel #1
0
        public void Add(SequenceItem item, string key = null)
        {
            if (String.IsNullOrEmpty(key))
            {
                key = item.Name;
            }

            if (String.IsNullOrEmpty(key))
            {
                throw new ArgumentNullException("Name", "Key/Name cannot be empty.");
            }

            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            this.SequenceSteps[key] = item;
        }
Beispiel #2
0
        public void Connect(SequenceItem from, SequenceItem to = null, string message = null)
        {
            if (from == null)
            {
                throw new ArgumentException("from");
            }

            if (message == null)
            {
                if (to != null)
                {
                    message = from.Name + "-" + to.Name;
                }
                else
                {
                    message = from.Name;
                }
            }

            this.Connectors.Add(new Tuple <SequenceItem, SequenceItem, string>(from, to, message));
        }