Example #1
0
        public static string[] GetDlls()
        {
            List <string> dllFiles = new List <string>();

            DirectoryInfo[] directorys = CommonToolkit.GetPluginsDirectorys();
            foreach (var dir in directorys)
            {
                string[] paths = CommonToolkit.GetDllFiles(dir.FullName);
                dllFiles.AddRange(paths);
            }
            return(dllFiles.ToArray());
        }
Example #2
0
 public static void SetupPlugin()
 {
     DirectoryInfo[] directories = CommonToolkit.GetPluginsDirectorys();
     foreach (var dir in directories)
     {
         string[] files = CommonToolkit.GetConfigFiles(dir.FullName);
         foreach (var file in files)
         {
             SetupPlugin(file);
         }
     }
 }
Example #3
0
        public static string GetDll(string assemblyName)
        {
            string returnPath = null;

            DirectoryInfo[] directorys = CommonToolkit.GetPluginsDirectorys();
            foreach (var dir in directorys)
            {
                string[] paths = CommonToolkit.GetDllFiles(dir.FullName);
                foreach (var path in paths)
                {
                    if (path.Contains(assemblyName))
                    {
                        returnPath = path;
                        break;
                    }
                }
            }
            return(returnPath);
        }