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 }
private Box foo() { Box someBox = new AmazingBox(); Box anotherBox; anotherBox = new Box(); anotherBox = someBox; if (this.Check) { return(new Box()); } else { return(anotherBox); } }
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 }
private Box bar() { Box box = new AmazingBox(); return(box); }