Inheritance: System.Dynamic.DynamicObject, IEnumerable
Esempio n. 1
0
        public dynamic ForEnvironment(string environment)
        {
            Config config;

            var envConfig = GetContainer(environment);
            var allConfig = GetContainer("all");

            if (allConfig == null)
            {
                config = new Config(envConfig);
            }
            else
            {
                MergeInto(allConfig, envConfig);
                config = new Config(allConfig);
            }

            if (!config.ContainsKey("environment"))
            {
                config.RawConfig["environment"] = environment;
            }
            return config;
        }