protected override void OnStop() { if (this.configUpdater != null) { this.configUpdater.Dispose(); this.configUpdater = null; } if (this.restartService != null) { this.restartService.Dispose(); this.restartService = null; } }
public void Start() { #if DEBUG string environmentName = "awesome!"; #else string environmentName = EC2Environment.GetEnvironmentName(); #endif MachineConfig machineConfig = new MachineConfig(environmentName); this.restartService = new RestartHubClient(machineConfig); string configFile = ConfigurationManager.AppSettings["File"]; ConfigOverrideManager configOverrideManager = new ConfigOverrideManager(configFile); this.configUpdater = new ConfigUpdater(machineConfig, configOverrideManager); this.configHubClient = new ConfigHubClient(machineConfig, this.configUpdater); }