Exemplo n.º 1
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State()
            {
                Parent = s0
            };
            var s2 = new State()
            {
                Parent = s0
            };
            var s3 = new State();
            var m1 = new Method("toto1");
            var m2 = new Method("q2");

            var x = new CSharpGenerator(s1);

            x.Add(new Transition(m1, s1, s2)
            {
                Action = "//action", Condition = "1==1"
            });
            x.Add(new Transition(m1, s2, s1));
            x.Add(new Transition(m2, s0, s3));

            return(x);
        }
Exemplo n.º 2
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State();
            var m0 = new Method("f");
            var x  = new CSharpGenerator(s0);

            x.Add(new Transition(m0, s0, s1));
            x.Add(new Transition(m0, s1, s0));
            return(x);
        }
Exemplo n.º 3
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State();
            var m  = new Method("HelloWorld");
            var x  = new CSharpGenerator(s0);

            x.Add(new Transition(m, s0));
            return(x);
        }
Exemplo n.º 4
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State();
            var s2 = new State();
            var m0 = new Method("calcul1", new Par("int", "a"));
            var x  = new CSharpGenerator(s0);

            x.Add(new Transition(m0, s0, s1)
            {
                Action = "// default "
            });
            x.Add(new Transition(m0, s0, s2)
            {
                Condition = "a<=2", Action = "// call a<=2", Index = 2
            });
            x.Add(new Transition(m0, s0, s1)
            {
                Condition = "a==1", Action = "// call a==1", Index = 1
            });
            return(x);
        }
Exemplo n.º 5
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State()
            {
                Parent = s0
            };
            var s2 = new State()
            {
                Parent = s0
            };
            var s3 = new State();

            var m0 = new Method("m0");
            var m1 = new Method("m1");
            var x  = new CSharpGenerator(s1);

            x.Add(new Transition(m0, s1, s2));
            x.Add(new Transition(m0, s2, s1));
            x.Add(new Transition(m1, s0, s3));
            return(x);
        }
Exemplo n.º 6
0
        public CSharpGenerator Generator()
        {
            var s0 = new State();
            var s1 = new State();
            var m0 = new Method("calcul1", new Par("int", "a"));
            var x  = new CSharpGenerator(s0);

            x.Add(new Transition(m0, s0, s1)
            {
                Condition = "a==0", Action = "// call"
            });

            return(x);
        }