public static PluginCollection Load(Stream stream)
        {
            PluginCollection res = new PluginCollection();

            try
            {
                XmlSerializer mySerializer =
                    new XmlSerializer(typeof(PluginCollection));
                res = (PluginCollection)mySerializer.Deserialize(stream);
            }
            catch (Exception exception)
            {
                Log.Error("Error loading plugin list ", exception);
            }
            return(res);
        }
        public static PluginCollection Load(string fileName)
        {
            PluginCollection res = new PluginCollection();

            try
            {
                if (File.Exists(fileName))
                {
                    FileStream myFileStream = new FileStream(fileName, FileMode.Open);
                    Load(myFileStream);
                    myFileStream.Close();
                }
            }
            catch (Exception exception)
            {
                Log.Error("Error loading plugin list ", exception);
            }
            return(res);
        }