Exemplo n.º 1
0
            protected override void OnEntry()
            {
                var machine = this.Machine as A2;

                machine.Target = Machine.Factory.CreateMachine <A2>();
                Envelope envelope = new Envelope();
                Box      box      = new AmazingBox();

                this.Send(machine.Target, new eUnit(envelope));

                box.foo(envelope); // ERROR
            }
Exemplo n.º 2
0
        private Box foo()
        {
            Box someBox = new AmazingBox();
            Box anotherBox;

            anotherBox = new Box();
            anotherBox = someBox;

            if (this.Check)
            {
                return(new Box());
            }
            else
            {
                return(anotherBox);
            }
        }
Exemplo n.º 3
0
            protected override void OnEntry()
            {
                var machine = this.Machine as B2;

                machine.Target = Machine.Factory.CreateMachine <B2>();
                Envelope envelope = new Envelope();
                Box      box;

                box = new Box();
                if (envelope.Id == 10)
                {
                    box = new Box();
                }
                else
                {
                    box = new AmazingBox();
                }

                this.Send(machine.Target, new eUnit(envelope));

                box.foo(envelope); // ERROR
            }
Exemplo n.º 4
0
        private Box bar()
        {
            Box box = new AmazingBox();

            return(box);
        }