Re-factored IIS 7 provider to improve GetSite() operation performance.

This commit is contained in:
feodor_fitsner 2011-12-12 15:04:33 -08:00
parent 58b073a6aa
commit eb64f13221
21 changed files with 1058 additions and 1058 deletions

View file

@ -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)