Example #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;
            }
        }
Example #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);
        }
Example #3
0
        private static void TimerCallback(object state)
        {
            ConfigUpdater obj = (ConfigUpdater)state;

            obj.TimerCallback();
        }