static void Main(string[] args) { AlertStateContext stateContext = new AlertStateContext(); stateContext.Alert(); stateContext.setState(new Vibration()); stateContext.Alert(); stateContext.Alert(); stateContext.setState(new Silent()); stateContext.Alert(); stateContext.Alert(); }
public void Alert(AlertStateContext ctx) { Console.WriteLine("Vibrating..."); }
public void Alert(AlertStateContext ctx) { Console.WriteLine("Silent..."); }