public void ReadDirectly()
        {
            const string          dcc  = "configs.01.dcc";
            FileConfigurationRepo repo = ConfigurationFactory.FromFile(dcc);
            var configs = repo.CreateAppConfigurator().Of <FakeConfiguration>();

            _ = configs.Key;
        }
        public async Task ReadWithFileChangeChecking()
        {
            const string          dcc  = "configs.02.dcc";
            FileConfigurationRepo repo = ConfigurationFactory.FromFile(dcc);
            var configs = repo.CreateAppConfigurator().Of <FakeConfiguration>();
            await repo.ReloadExternalChangesAsync().ConfigureAwait(false);

            _ = configs.Key;
        }
예제 #3
0
        public static IAppConfigurator GetAppConfigurator()
        {
            if (_appConfigurator is null)
            {
                var fileConfigurationRepo = new FileConfigurationRepo(ConfigurationFile.FullName);
                _appConfigurator = fileConfigurationRepo.CreateAppConfigurator();
            }

            return(_appConfigurator);
        }