Пример #1
0
 /// <summary>
 /// [反射]获取一个程序集配置文件
 /// </summary>
 /// <param name="Path">配置文件的完整路径</param>
 /// <param name="Root"></param>
 /// <param name="ClsName"></param>
 /// <returns></returns>
 public static clsConfig GetAsmConfig(string Path, string Root, string ClsName)
 {
     if (!Apq.GlobalObject.AsmConfigs.ContainsKey(Path))
     {
         clsConfig Config = Activator.CreateInstance(Type.GetType(ClsName)) as clsConfig;
         if (Config != null)
         {
             Config.Open(Path, Root);
             Path = Config.Path;                         // 兼容注册表
             try
             {
                 Apq.GlobalObject.AsmConfigs.Add(Path, Config);
             }
             catch { }
         }
     }
     return(Apq.GlobalObject.AsmConfigs[Path] as clsConfig);
 }
Пример #2
0
 /// <summary>
 /// 配置链
 /// </summary>
 /// <param name="AsmConfig">程序集配置文件</param>
 /// <param name="UserConfig">用户配置文件</param>
 public ConfigChain(clsConfig AsmConfig, clsConfig UserConfig)
 {
     _AsmConfig  = AsmConfig;
     _UserConfig = UserConfig;
 }
Пример #3
0
		/// <summary>
		/// 配置链
		/// </summary>
		/// <param name="AsmConfig">程序集配置文件</param>
		/// <param name="UserConfig">用户配置文件</param>
		public ConfigChain(clsConfig AsmConfig, clsConfig UserConfig)
		{
			_AsmConfig = AsmConfig;
			_UserConfig = UserConfig;
		}