コード例 #1
0
        private static void LoadFolder(string folder)

        {
            try

            {
                if (!loadedPlugins.ContainsKey(folder))

                {
                    PluginFinder pf = new PluginFinder();

                    IForwardDestinationHandler plugin = pf.Search <IForwardDestinationHandler>(folder, CheckType, ignoreList);

                    if (plugin != null)

                    {
                        Type type = plugin.GetType();

                        PluginInfo pi = new PluginInfo(folder, type);



                        LoadPlugin(pi, plugin);
                    }
                }
            }

            catch (Exception ex)

            {
                // suppress any per-plugin loading exceptions

                Utility.WriteDebugInfo(String.Format("Plugin failed to load: '{0}' - {1} - {2}", folder, ex.Message, ex.StackTrace));
            }
        }