public static ServerSettings Current()
 {
     return _serverSettings ?? (_serverSettings = new ServerSettings
     {
         App = ConfigurationManager.Instance.AppSettings.Map<AppSettings>(),
         Component = ConfigurationManager.Instance.GetSection<ComponentSettings>("dynamicConfigurator")
     });
 }
        private void RegisterRepository(ServerSettings settings)
        {
            IConfigurationRepository repository = new InMemoryConfigurationRepository();

            if (settings?.Component?.Repository != null)
            {
                repository = (IConfigurationRepository)settings.Component.Repository.Create();
            }

            this.RegisterInstance(repository).AsImplementedInterfaces();
        }