Exemplo n.º 1
0
 public static void Regist()
 {
     PluginsManagement.RegistAtStart();
 }
Exemplo n.º 2
0
        public static IEnumerable <Plugin <T> > GetPlugins <T>()
            where T : IPlugin
        {
            IEnumerable <PluginInfo> installedPluginInfos = PluginsManagement.GetInstalledPluginInfos(PluginsManagement.GetPluginTypeByType(typeof(T)));
            int num = installedPluginInfos.Count();

            Plugin <T>[] pluginArray = new Plugin <T> [num];
            for (int i = 0; i < num; i++)
            {
                Plugin <T> plugin = new Plugin <T>()
                {
                    Biz        = Instance.Get <T>(installedPluginInfos.ElementAt <PluginInfo>(i).ClassFullName),
                    PluginInfo = installedPluginInfos.ElementAt <PluginInfo>(i)
                };
                pluginArray[i] = plugin;
            }
            return(pluginArray);
        }