PERF: Don't monitor files if component have been disabled

--HG--
branch : 1.x
extra : transplant_source : %7D%07%23%F0%0ED%E7%B6%00%BA%DA%5C%CBv%24z%07%1B%F2%B6
This commit is contained in:
Renaud Paquay
2011-04-30 19:50:32 -07:00
parent 63e2c3475f
commit 0dabbb5322
2 changed files with 6 additions and 0 deletions

View File

@@ -67,6 +67,9 @@ namespace Orchard.Environment.Extensions.Loaders {
}
public override void Monitor(ExtensionDescriptor descriptor, Action<IVolatileToken> monitor) {
if (Disabled)
return;
// Monitor .csproj and all .cs files
string projectPath = GetProjectPath(descriptor);
if (projectPath != null) {

View File

@@ -122,6 +122,9 @@ namespace Orchard.Environment.Extensions.Loaders {
}
public override void Monitor(ExtensionDescriptor descriptor, Action<IVolatileToken> monitor) {
if (Disabled)
return;
// If the assembly exists, monitor it
string assemblyPath = GetAssemblyPath(descriptor);
if (assemblyPath != null) {