示例#1
0
        private InMemoryConfigurationBuilder Add(string key, Action <InMemoryConfigurationBuilder> addChildren)
        {
            var builder = new InMemoryConfigurationBuilder($"{_prefix}{key}{_delimiter}", InMemoryConfiguration);

            addChildren(builder);
            return(this);
        }
示例#2
0
        public virtual void UpdateConfiguration(string name, Action <IInMemoryConfigurationBuilderRoot> configure, bool clear = false)
        {
            var builder = new InMemoryConfigurationBuilder();

            configure(builder);
            UpdateConfiguration(name, builder.InMemoryConfiguration, clear);
        }
示例#3
0
        internal void ConfigureAppConfiguration(IConfigurationBuilder builder, Action <IInMemoryConfigurationBuilderRoot> configure, out InMemoryConfigurationSource source)
        {
            var inMemoryConfigurationBuilder = new InMemoryConfigurationBuilder();

            configure(inMemoryConfigurationBuilder);
            source = inMemoryConfigurationBuilder.Build();
            builder.Sources.Add(source);
        }