コード例 #1
0
        public bool LoadAssembly(string searchPath)
        {
            InitalizeException();
            AppDomain.CurrentDomain.AssemblyResolve += (CurrentDomain_AssemblyResolve);
            try
            {
                if (!File.Exists(searchPath))
                {
                    MessageBox.Show(searchPath + " does not exist. Please remove it using 'Add Assemblies' button.",
                                    "Object Manager Enterprise",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(false);
                }


                string[] str  = searchPath.Split('\\');
                string   name = str[str.Length - 1];
                name = name.Remove(name.LastIndexOf('.'));
                bool check = AppDomain.CurrentDomain.GetAssemblies().Any(a => a.GetName().Name == name);

                if (check == false)
                {
                    Assembly assembly = ManageCustomConfig.LoadAssembly(searchPath);

                    assemblies[assembly.FullName] = assembly;
                }

                return(true);
            }
            catch (Exception exception)
            {
                LoggingHelper.ShowMessage(exception);
                return(false);
            }
        }
コード例 #2
0
        public bool LoadAssembly(string searchPath)
        {
            Assembly assembly = ManageCustomConfig.LoadAssembly(searchPath);

            assemblies[assembly.FullName] = assembly;
            return(true);
        }
コード例 #3
0
        public static IEmbeddedConfiguration Config()
        {
            IEmbeddedConfiguration config1 = ManageCustomConfig.ConfigureEmbeddedCustomConfig();

            return(config1);
        }
コード例 #4
0
 public bool CheckIfCustomConfigImplemented(bool local)
 {
     return(ManageCustomConfig.CheckConfig(local));
 }