Example #1
0
 public void HookExtension(string extensionPointName, ExtensionChangeHandler handler)
 {
     _extensionBuilders[extensionPointName] = handler;
     //加载已有的Extension
     LoadExistingExtensions(extensionPointName, _extensionBuilders[extensionPointName]);
 }
Example #2
0
 private void LoadExistingExtensions(string extensionPoint, ExtensionChangeHandler extensionChangeBuilder)
 {
     _extensionManager.GetExtensions(extensionPoint).ForEach(
         extension => extensionChangeBuilder.Builder.Build(extension.Data, extension.Owner));
 }