/// <inheritodc />
        public void AddPlugin(Plugin plugin, DirectoryInfo baseDirectory)
        {
            if (plugin == null)
                throw new ArgumentNullException("plugin");
            if (baseDirectory == null)
                throw new ArgumentNullException("baseDirectory");

            plugins.Add(new PluginData(plugin, baseDirectory));
        }
        private static string GenerateInvalidPluginXml()
        {
            Plugin samplePlugin = new Plugin("pluginId");

            return Assert.XmlSerialize(samplePlugin).Replace("pluginId=\"pluginId\"", "");
        }
        internal static string GenerateValidPluginXml()
        {
            Plugin samplePlugin = new Plugin("pluginId")
            {
                Assemblies =
                {
                    new Assembly("Assembly1") { CodeBase = "CodeBase.dll" },
                    new Assembly("Assembly2")
                },
                Services =
                {
                    new Service("serviceId", "Service, Assembly")
                },
                Components =
                {
                    new Component("componentId", "serviceId", "Component, Assembly")
                }
            };

            return Assert.XmlSerialize(samplePlugin);
        }
 public PluginData(Plugin plugin, DirectoryInfo baseDirectory)
 {
     Plugin = plugin;
     BaseDirectory = baseDirectory;
 }
 ///<summary>
 /// Constructor.
 ///</summary>
 ///<param name="plugin">The loaded plugin.</param>
 ///<param name="baseDirectory">The base directory.</param>
 ///<param name="pluginFilePath">The plugin file path.</param>
 public PluginLoadedEventArgs(Plugin plugin, DirectoryInfo baseDirectory, string pluginFilePath)
 {
     Plugin = plugin;
     BaseDirectory = baseDirectory;
     PluginFilePath = pluginFilePath;
 }