コード例 #1
0
        public Initial Generate()
        {
            var initial = new Initial
            {
                Name = "ServiceMatrix Guidance",
            };

            var guidanceaction = new GuidanceAction
            {
                Name = "ServiceMatrix Online Documentation",
                Link = "http://docs.particular.net/servicematrix/"
            };
            initial.ConnectTo(guidanceaction);

            var final = new Final
            {
                Name = "Final",
            };
            guidanceaction.ConnectTo(final);

            return initial;
        }
コード例 #2
0
        public Initial Generate()
        {
            Join previousJoin = null;
            var initial = new Initial
            {
                Name = "ServiceMatrix Guidance",
            };

            foreach (var topic in this.Items.GroupBy(x => x.Item1))
            {
                var fork = new Fork
                {
                    Name = topic.Key.Trim(),
                };
                if (previousJoin == null)
                    initial.ConnectTo(fork);
                else
                    previousJoin.ConnectTo(fork);

                var lastItem = this.GenerateItems(topic, fork);

                var join = new Join
                {
                    Name = topic.Key + "Join",
                };
                lastItem.ConnectTo(join);
                previousJoin = join;
            }

            var final = new Final
            {
                Name = "Final",
            };
            previousJoin.ConnectTo(final);

            return initial;
        }
コード例 #3
0
        /// <summary>
        /// Connects this workflow with the <see cref="Initial"/> received as parameter.
        /// </summary>
        /// <param name="node">The <see cref="Initial"/> to connect as successor of this activity.</param>
        public virtual void ConnectTo(Initial node)
        {
            Guard.NotNull(() => node, node);

            this.ConnectTo(new Node[] { node });
        }
コード例 #4
0
        /// <summary>
        /// Connects this workflow with the <see cref="Initial"/> received as parameter.
        /// </summary>
        /// <param name="node">The <see cref="Initial"/> to connect as successor of this activity.</param>
        public virtual void ConnectTo(Initial node)
        {
            Guard.NotNull(() => node, node);

            this.ConnectTo(new Node[] { node });
        }