Ejemplo n.º 1
0
        protected override void Build(IConfiguration parent, DictionaryEntry entry)
        {
            var child = ConfigurationHelper.CreateChild(parent, item, null);

            child.Attributes[key] = entry.Key.ToString();
            ConfigurationHelper.SetConfigurationValue(child, _value, entry.Value, null, true);
        }
Ejemplo n.º 2
0
        public void Build(IConfiguration parent, object configValue)
        {
            var list = (ICollection)configValue;

            if (!string.IsNullOrEmpty(_name))
            {
                var config = ConfigurationHelper.CreateChild(parent, _name, null);
                parent = config;
            }

            foreach (object child in list)
            {
                ConfigurationHelper.SetConfigurationValue(parent, _item, child, _value, false);
            }
        }
Ejemplo n.º 3
0
        public void Build(IConfiguration parent, object value)
        {
            IDictionary map = (IDictionary)value;

            if (!string.IsNullOrEmpty(_name))
            {
                IConfiguration config = ConfigurationHelper.CreateChild(parent, _name, null);
                parent = config;
            }

            foreach (DictionaryEntry entry in map)
            {
                IConfigurationBuilder builder = entry.Key as IConfigurationBuilder;
                if (builder != null)
                {
                    builder.Build(parent, entry.Value);
                }
                else
                {
                    Build(parent, entry);
                }
            }
        }