Example #1
0
        private static bool LoadStatics(PluginInformation pi, PluginAssembly pa, bool fForce)
        {
            Plugin plugin = pa.Load(pi.PluginID);

            if ((plugin != null) && (plugin.Instance != null))
            {
                dicStaticPluginInstances[pi.PluginID] = plugin;
                if ((plgEncodingDetector == null) || fForce)
                {
                    QTPlugin.IEncodingDetector instance = plugin.Instance as QTPlugin.IEncodingDetector;
                    if (instance != null)
                    {
                        try {
                            instance.Open(null, null);
                            plgEncodingDetector = instance;
                            return(true);
                        }
                        catch (Exception exception) {
                            HandlePluginException(exception, IntPtr.Zero, pi.Name, "Loading static plugin.");
                        }
                    }
                }
            }
            return(false);
        }
Example #2
0
 public static void ClearIEncodingDetector()
 {
     plgEncodingDetector = null;
 }