public void RegisterComponent(IConfigurationRefresh component)
        {
            component.Init(_environment.Configuration);
            EventHandler <EventArgs> registration = (sender, _) => component.ConfigChanged(((IEnvironment)sender).Configuration);

            _environment.ConfigurationChanged += registration;
            _registrations.Add(component, registration);
        }
 public void RegisterComponent(IConfigurationRefresh component)
 {
     var environement = _host.DependencyResolver.Resolve<IEnvironment>();
     component.Init(environement.Configuration);
     EventHandler<EventArgs> registration = (sender, _) => component.ConfigChanged(((IEnvironment)sender).Configuration);
     environement.ConfigurationChanged += registration;
     _registrations.Add(component, registration);
 }