private void Initialize() { // We are starting up for the first time. _modeState = new ModePowerUpState(this); _door = new Door(this); // The initial configuration setting for the // device. This initial configuration can come // from an external configuration file, for // example. _configurationState = new ProductionConfigurationState(this); // The door is initially closed _door.DoorState = new DoorClosedState(_door); // We are ready _modeState.SetModeToIdle(); }
public ProductionConfigurationState(ConfigurationState configurationState) { this.Device = configurationState.Device; Initialize(); }
public TestConfigurationState(ConfigurationState configurationState) { this.Device = configurationState.Device; Initialize(); }