Re-factored IIS 7 provider to improve GetSite() operation performance.
This commit is contained in:
parent
58b073a6aa
commit
eb64f13221
21 changed files with 1058 additions and 1058 deletions
|
@ -35,20 +35,17 @@ namespace WebsitePanel.Providers.Web.Iis.DirectoryBrowse
|
|||
|
||||
internal sealed class DirectoryBrowseModuleService : ConfigurationModuleService
|
||||
{
|
||||
public PropertyBag GetDirectoryBrowseSettings(string siteId)
|
||||
public PropertyBag GetDirectoryBrowseSettings(ServerManager srvman, string siteId)
|
||||
{
|
||||
using (var srvman = GetServerManager())
|
||||
{
|
||||
var config = srvman.GetWebConfiguration(siteId);
|
||||
//
|
||||
DirectoryBrowseSection directoryBrowseSection = (DirectoryBrowseSection)config.GetSection(Constants.DirectoryBrowseSection, typeof(DirectoryBrowseSection));
|
||||
//
|
||||
PropertyBag bag = new PropertyBag();
|
||||
bag[DirectoryBrowseGlobals.Enabled] = directoryBrowseSection.Enabled;
|
||||
bag[DirectoryBrowseGlobals.ShowFlags] = (int)directoryBrowseSection.ShowFlags;
|
||||
bag[DirectoryBrowseGlobals.ReadOnly] = directoryBrowseSection.IsLocked;
|
||||
return bag;
|
||||
}
|
||||
var config = srvman.GetWebConfiguration(siteId);
|
||||
//
|
||||
DirectoryBrowseSection directoryBrowseSection = (DirectoryBrowseSection)config.GetSection(Constants.DirectoryBrowseSection, typeof(DirectoryBrowseSection));
|
||||
//
|
||||
PropertyBag bag = new PropertyBag();
|
||||
bag[DirectoryBrowseGlobals.Enabled] = directoryBrowseSection.Enabled;
|
||||
bag[DirectoryBrowseGlobals.ShowFlags] = (int)directoryBrowseSection.ShowFlags;
|
||||
bag[DirectoryBrowseGlobals.ReadOnly] = directoryBrowseSection.IsLocked;
|
||||
return bag;
|
||||
}
|
||||
|
||||
public void SetDirectoryBrowseEnabled(string siteId, bool enabled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue