Example #1
0
        public static FlowMachine FromEnum <T>() where T : System.Enum
        {
            FlowMachine fd = new FlowMachine();

            foreach (var item in System.Enum.GetNames(typeof(T)))
            {
                fd.CreateNode(typeof(T).Name + "." + item);
            }
            return(fd);
        }
Example #2
0
        public static FlowMachine BinaryDiagram()
        {
            var fd = new FlowMachine();

            fd.CreateNode("0");
            fd.CreateNode("1");
            fd.Connect("0", "1");
            fd.Connect("1", "0");
            return(fd);
        }