- Some more refactoring, IExtensionManager.AvailableExtensions should be used instead of the obsoleted ActiveExtensions method to query extensions in the system.

- ActiveExtensions will be removed once the HackInstallationGenerator is removed.

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-04-26 16:52:31 -07:00
parent 4eb92e63ec
commit 9819dfa8b1
2 changed files with 6 additions and 5 deletions

View File

@@ -6,9 +6,10 @@ namespace Orchard.Environment.Extensions {
public interface IExtensionManager {
IEnumerable<ExtensionDescriptor> AvailableExtensions();
IEnumerable<Feature> LoadFeatures(IEnumerable<FeatureDescriptor> featureDescriptors);
IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete();
void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle);
void UninstallExtension(string extensionType, string extensionName);
// Used by the HackInstallationGenerator and will be removed along with it.
IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete();
}
}

View File

@@ -52,10 +52,10 @@ namespace Orchard.Mvc.ViewEngines {
}
var modules = _extensionManager.ActiveExtensions_Obsolete()
.Where(x => x.Descriptor.ExtensionType == "Module");
var modules = _extensionManager.AvailableExtensions()
.Where(x => x.ExtensionType == "Module");
var moduleLocations = modules.Select(x => Path.Combine(x.Descriptor.Location, x.Descriptor.Name));
var moduleLocations = modules.Select(x => Path.Combine(x.Location, x.Name));
var moduleViewEngines = _viewEngineProviders
.Select(x => x.CreateModulesViewEngine(new CreateModulesViewEngineParams { VirtualPaths = moduleLocations }));
Logger.Debug("Module locations:\r\n\t-{0}", string.Join("\r\n\t-", moduleLocations.ToArray()));