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

            obj.TimerCallback();
        }