示例#1
0
        protected override void OnStop()
        {
            if (this.configUpdater != null)
            {
                this.configUpdater.Dispose();
                this.configUpdater = null;
            }

            if (this.restartService != null)
            {
                this.restartService.Dispose();
                this.restartService = null;
            }
        }
示例#2
0
        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);
        }