Web.config section fix

This commit is contained in:
vfedosevich 2014-12-30 04:04:27 -08:00
parent f5b41b5c85
commit 58b6b89ab0
10 changed files with 3 additions and 104 deletions

View file

@ -1,27 +0,0 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
{
public class AppConnectionStringsElement : ConfigurationElement
{
private const string ConnectionStringKey = "key";
private const string ConnectionStringValue = "connectionString";
public const string WebdavConnectionStringKey = "WebDavServerConnectionString";
public const string LdapConnectionStringKey = "LdapServerConnectionString";
[ConfigurationProperty(ConnectionStringKey, IsKey = true, IsRequired = true)]
public string Key
{
get { return (string) this[ConnectionStringKey]; }
set { this[ConnectionStringKey] = value; }
}
[ConfigurationProperty(ConnectionStringValue, IsKey = true, IsRequired = true)]
public string ConnectionString
{
get { return (string) this[ConnectionStringValue]; }
set { this[ConnectionStringValue] = value; }
}
}
}

View file

@ -1,18 +0,0 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
{
[ConfigurationCollection(typeof (AppConnectionStringsElement))]
public class AppConnectionStringsElementCollection : ConfigurationElementCollection
{
protected override ConfigurationElement CreateNewElement()
{
return new AppConnectionStringsElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((AppConnectionStringsElement) element).Key;
}
}
}

View file

@ -44,13 +44,6 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
set { this[ElementsRenderingKey] = value; }
}
[ConfigurationProperty(ConnectionStringsKey, IsDefaultCollection = false)]
public AppConnectionStringsElementCollection ConnectionStrings
{
get { return (AppConnectionStringsElementCollection) this[ConnectionStringsKey]; }
set { this[ConnectionStringsKey] = value; }
}
[ConfigurationProperty(SessionKeysKey, IsDefaultCollection = false)]
public SessionKeysElementCollection SessionKeys
{