Web.config section fix
This commit is contained in:
parent
f5b41b5c85
commit
58b6b89ab0
10 changed files with 3 additions and 104 deletions
|
@ -1,39 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using WebsitePanel.WebDavPortal.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.Config.Entities
|
||||
{
|
||||
public class ConnectionStringsCollection : AbstractConfigCollection
|
||||
{
|
||||
private readonly IEnumerable<AppConnectionStringsElement> _appConnectionStringsElements;
|
||||
|
||||
public ConnectionStringsCollection()
|
||||
{
|
||||
_appConnectionStringsElements = ConfigSection.ConnectionStrings.Cast<AppConnectionStringsElement>();
|
||||
}
|
||||
|
||||
public string WebDavServer
|
||||
{
|
||||
get
|
||||
{
|
||||
AppConnectionStringsElement connectionStr =
|
||||
_appConnectionStringsElements.FirstOrDefault(
|
||||
x => x.Key == AppConnectionStringsElement.WebdavConnectionStringKey);
|
||||
return connectionStr != null ? connectionStr.ConnectionString : null;
|
||||
}
|
||||
}
|
||||
|
||||
public string LdapServer
|
||||
{
|
||||
get
|
||||
{
|
||||
AppConnectionStringsElement connectionStr =
|
||||
_appConnectionStringsElements.FirstOrDefault(
|
||||
x => x.Key == AppConnectionStringsElement.LdapConnectionStringKey);
|
||||
return connectionStr != null ? connectionStr.ConnectionString : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,6 @@ namespace WebsitePanel.WebDavPortal.Config
|
|||
string ApplicationName { get; }
|
||||
ElementsRendering ElementsRendering { get; }
|
||||
WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; }
|
||||
ConnectionStringsCollection ConnectionStrings { get; }
|
||||
SessionKeysCollection SessionKeys { get; }
|
||||
FileIconsDictionary FileIcons { get; }
|
||||
HttpErrorsCollection HttpErrors { get; }
|
||||
|
|
|
@ -14,7 +14,6 @@ namespace WebsitePanel.WebDavPortal.Config
|
|||
_configSection = ((WebDavExplorerConfigurationSettingsSection) ConfigurationManager.GetSection(WebDavExplorerConfigurationSettingsSection.SectionName));
|
||||
WebsitePanelConstantUserParameters = new WebsitePanelConstantUserParameters();
|
||||
ElementsRendering = new ElementsRendering();
|
||||
ConnectionStrings = new ConnectionStringsCollection();
|
||||
SessionKeys = new SessionKeysCollection();
|
||||
FileIcons = new FileIconsDictionary();
|
||||
HttpErrors = new HttpErrorsCollection();
|
||||
|
@ -38,7 +37,6 @@ namespace WebsitePanel.WebDavPortal.Config
|
|||
|
||||
public ElementsRendering ElementsRendering { get; private set; }
|
||||
public WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; private set; }
|
||||
public ConnectionStringsCollection ConnectionStrings { get; private set; }
|
||||
public SessionKeysCollection SessionKeys { get; private set; }
|
||||
public FileIconsDictionary FileIcons { get; private set; }
|
||||
public HttpErrorsCollection HttpErrors { get; private set; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue