Beispiel #1
0
 public Executor()
 {
     this.actuator         = new FixMachineActuator();
     this.context          = new ExecutorContext(this);
     this.context.Observer = ObserverTrace.Instance("Executor");
     this.context.EnterInitialState();
 }
Beispiel #2
0
 private void InitializeContext()
 {
     this.context             = new DoorContext(Engine);
     this.context.Observer    = ObserverTrace.Instance(traceName);
     this.context.EndHandler += new EventHandler <EventArgs>(StateMachineEnd);
     this.context.EnterInitialState();
 }
Beispiel #3
0
 private void InitializeContext()
 {
     this.context             = new CallDirectorContext(this.callControl, this.callScenario);
     this.context.Observer    = ObserverTrace.Instance(traceName);
     this.context.EndHandler += new EventHandler <EventArgs>(StateMachineEnd);
     this.context.EnterInitialState();
 }
 public CallScenario(CallControl callControl)
 {
     this.config              = new CallBase01Config();
     this.context             = new CallBase01Context(callControl, this, this.config);
     this.context.Observer    = ObserverTrace.Instance(traceName);
     this.context.EndHandler += new EventHandler <EventArgs>(StateMachineEnd);
     this.context.EnterInitialState();
 }
 public TrafficLight()
 {
     this.light               = new Light();
     this.context             = new TrafficLightContext(light);
     this.context.Observer    = ObserverTrace.Instance(traceName);
     this.context.EndHandler += new EventHandler <EventArgs>(StateMachineEnd);
     this.context.EnterInitialState();
 }
Beispiel #6
0
 public Ping()
 {
     pingSender.PingCompleted += new PingCompletedEventHandler(PingComplete);
     this.context              = new PingContext(this);
     this.context.Observer     = ObserverTrace.Instance(traceName);
     this.context.EndHandler  += new EventHandler <EventArgs>(StateMachineEnd);
     this.context.EnterInitialState();
     Reset();
 }
 private void InitializeContext(ContextBase context)
 {
     context.Observer = ObserverTrace.Instance(traceName);
     context.RegisterEndHandler(new EventHandler <EventArgs>(End));
     context.EnterInitialState();
 }
Beispiel #8
0
 public Trader()
 {
     this.context          = new TraderContext(this);
     this.context.Observer = ObserverTrace.Instance("Trader");
     this.context.EnterInitialState();
 }