/// <summary> /// Loads a plugin for the specified hook. /// </summary> private static IDeployerPlugin LoadPlugin(DeployHookSettings hook) { string pluginType = hook.Pluginsettings.Type; EventManager.OnNotificationMessage(string.Format("Loading plugin for hook '{0}'...", hook.Identifier)); return LoadPlugin(hook.Identifier, pluginType, hook.Pluginsettings.Settings.OuterXml); }
/// <summary> /// Retrieves the plugin used for hooking into deployment. The plugin will be automatically /// loaded if required. /// </summary> public static IDeployerHook GetPluginForHook(DeployHookSettings hook) { IDeployerPlugin plugin; if(!_plugins.TryGetValue(hook.Identifier, out plugin)) { // Attempt to load it plugin = LoadPlugin(hook); } return (IDeployerHook) plugin; }