websitepanel/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebConfigSections/FileIconsElementCollection.cs
2014-12-03 11:43:26 +03:00

27 lines
No EOL
862 B
C#

using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
{
[ConfigurationCollection(typeof (FileIconsElement))]
public class FileIconsElementCollection : ConfigurationElementCollection
{
private const string DefaultPathKey = "defaultPath";
[ConfigurationProperty(DefaultPathKey, IsRequired = false, DefaultValue = "/")]
public string DefaultPath
{
get { return (string) this[DefaultPathKey]; }
set { this[DefaultPathKey] = value; }
}
protected override ConfigurationElement CreateNewElement()
{
return new FileIconsElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((FileIconsElement) element).Extension;
}
}
}