コード例 #1
0
        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);
        }
コード例 #2
0
 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);
 }