Add support for dynamic extension dependencies

Suppose Module A is loaded through its pre-compiled version
Suppose Module B is loaded through its pre-compiled version
Suppose Module A depends on Module B

If the csproj of Module B is updated, Module B will be dynamically compiled.
We have to ensure Module A is also dynamically compiled, because Module A can't
reference the pre-compiled version of B anymore.

The way we enforce this is by asking every loader if they are compatible
with all module references of a module before picking it as the actual loader.
If a loader decides it's not compatible with the module references, the next
loader in order of priority will be considered.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-06-30 23:41:44 -07:00
parent 5b89b6a78d
commit 606d1869ab
9 changed files with 120 additions and 50 deletions

View File

@@ -69,6 +69,10 @@ namespace Orchard.Tests.Environment.Extensions {
throw new NotImplementedException();
}
public bool IsCompatibleWithReferences(ExtensionDescriptor extension, IEnumerable<ExtensionProbeEntry> references) {
throw new NotImplementedException();
}
public ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
return new ExtensionProbeEntry { Descriptor = descriptor, Loader = this };
}

View File

@@ -68,6 +68,10 @@ namespace Orchard.Tests.Environment.Extensions {
throw new NotImplementedException();
}
public bool IsCompatibleWithReferences(ExtensionDescriptor extension, IEnumerable<ExtensionProbeEntry> references) {
throw new NotImplementedException();
}
public ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
return new ExtensionProbeEntry { Descriptor = descriptor, Loader = this };
}