mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
work on extension loading
* Add a "ExtensionLoaderCoordinator" class * Rework the way loaders are notified of extensions being loaded, (de)activated, etc. --HG-- branch : dev
This commit is contained in:
@@ -43,23 +43,19 @@ namespace Orchard.Tests.Environment.Extensions {
|
||||
}
|
||||
}
|
||||
|
||||
public class StubLoaders : IExtensionLoader {
|
||||
public class StubLoaders : ExtensionLoaderBase {
|
||||
#region Implementation of IExtensionLoader
|
||||
|
||||
public int Order {
|
||||
public override int Order {
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
public ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
|
||||
public override ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
|
||||
return new ExtensionProbeEntry { Descriptor = descriptor, Loader = this };
|
||||
}
|
||||
|
||||
public ExtensionEntry Load(ExtensionProbeEntry entry) {
|
||||
return new ExtensionEntry { Descriptor = entry.Descriptor, ExportedTypes = new[] { typeof(Alpha), typeof(Beta), typeof(Phi) } };
|
||||
}
|
||||
|
||||
public void Monitor(ExtensionDescriptor descriptor, Action<IVolatileToken> monitor) {
|
||||
throw new NotImplementedException();
|
||||
public override ExtensionEntry Load(ExtensionDescriptor descriptor) {
|
||||
return new ExtensionEntry { Descriptor = descriptor, ExportedTypes = new[] { typeof(Alpha), typeof(Beta), typeof(Phi) } };
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user