private void InitializeContext() { this.context = new DoorContext(Engine); this.context.Observer = ObserverTrace.Instance(traceName); this.context.EndHandler += new EventHandler <EventArgs>(StateMachineEnd); this.context.EnterInitialState(); }
public Executor() { this.actuator = new FixMachineActuator(); this.context = new ExecutorContext(this); this.context.Observer = ObserverTrace.Instance("Executor"); this.context.EnterInitialState(); }
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(); }
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(); }
public Trader() { this.context = new TraderContext(this); this.context.Observer = ObserverTrace.Instance("Trader"); this.context.EnterInitialState(); }
/// <summary> /// Specifies whether an observer should be notified when an error condition is detected /// </summary> /// <param name="trace">The trace specification</param> public static bool TraceErrors(this ObserverTrace trace) => (trace & Errors) == Errors;
public static bool TraceCompletions(this ObserverTrace trace) => (trace & Completions) == Completions;
public static bool TraceEvents(this ObserverTrace trace) => (trace & Events) == Events;
public static bool TraceTransitions(this ObserverTrace trace) => (trace & Transitions) == Transitions;