private void LoadPlugin(Type type) { var ctor = type.GetConstructor(new Type[0]); if (ctor != null) { PluginInterface plugin = ctor.Invoke(new object[0]) as PluginInterface; plugin.OnLoad(BooruApp.BooruApplication); Booru.BooruApp.BooruApplication.Log.Log(BooruLog.Category.Application, BooruLog.Severity.Info, "Loaded plugin '" + plugin.Name + "'"); LoadedPlugins.Add(plugin); } }