Added a "Disabled" option for all extension loaders

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-12-12 23:25:43 -08:00
parent 7c3b71d5e2
commit e4243412d1

View File

@@ -41,6 +41,7 @@ namespace Orchard.Environment.Extensions.Loaders {
}
public ILogger Logger { get; set; }
public bool Disabled { get; set; }
public override int Order { get { return 100; } }
@@ -146,6 +147,9 @@ namespace Orchard.Environment.Extensions.Loaders {
}
public override ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
if (Disabled)
return null;
string projectPath = GetProjectPath(descriptor);
if (projectPath == null)
return null;
@@ -159,6 +163,9 @@ namespace Orchard.Environment.Extensions.Loaders {
}
protected override ExtensionEntry LoadWorker(ExtensionDescriptor descriptor) {
if (Disabled)
return null;
string projectPath = GetProjectPath(descriptor);
if (projectPath == null)
return null;