static void Main(string[] args) { Program program = new Program(); gate = new GateExample.Gate(); Console.WriteLine(@"Select one of the following option: 1-Enter 2-Pay 3-PayOk 4-PayFailed 5-Get Current State 6-Help 7-exit"); string key; while ((key = Console.ReadKey().KeyChar.ToString()) != "7") { Console.WriteLine(); int keyValue; int.TryParse(key, out keyValue); ProcessInput(keyValue); } }
public ProcessingGateState(Gate gate) : base(gate) { this.gate = gate; }
public ClosedGateState(Gate gate) : base(gate) { this.gate = gate; }
public OpenGateState(Gate gate) : base(gate) { this.gate = gate; }
public GateState(Gate gate) { Console.WriteLine("Creating New State : " + this.GetType().ToString()); this.gate = gate; }