using System.Configuration; namespace DataPro.Core.PluginLib { /// /// Support class that parses data from DataPro.Core.PluginLib.Config configuration section /// public class PluginConfigSectionHandler : ConfigurationSection { [ConfigurationProperty("PluginFolders")] public FilterHashKeyCollection HashKeys { get { return ((FilterHashKeyCollection)(base["PluginFolders"])); } } } [ConfigurationCollection(typeof(FilterHashElement))] public class FilterHashKeyCollection : ConfigurationElementCollection { protected override ConfigurationElement CreateNewElement() { return new FilterHashElement(); } protected override object GetElementKey(ConfigurationElement element) { return ((FilterHashElement)(element)).Key; } public FilterHashElement this[int idx] { get { return (FilterHashElement)BaseGet(idx); } } } public class FilterHashElement : ConfigurationElement { [ConfigurationProperty("key", DefaultValue = "", IsKey = true, IsRequired = true)] public string Key { get { return ((string)(base["key"])); } set { base["key"] = value; } } [ConfigurationProperty("value", DefaultValue = "", IsKey = false, IsRequired = false)] public string Value { get { return ((string)(base["value"])); } set { base["value"] = value; } } } }