/// <summary>
 /// ʵ�������򼯹���
 /// </summary>
 /// <param name="assemblyPath">����DLL�ļ�·��</param>
 /// <param name="newDomainName">�½�������������</param>
 /// <param name="newDomain">�½�������������</param>
 public AssemblyLoader(string assemblyPath, string newDomainName, AppDomainSetup newDomain)
 {
     _domain = AppDomain.CreateDomain(newDomainName, null, newDomain);
     _object = (ProxyAssembly)_domain.CreateInstanceFromAndUnwrap(Assembly.GetExecutingAssembly().CodeBase, "Silmoon.Reflection.ProxyAssembly");
     _dllPath = assemblyPath;
 }
Esempio n. 2
0
 /// <summary>
 /// 实例化程序集管理
 /// </summary>
 /// <param name="assemblyPath">程序集DLL文件路径</param>
 /// <param name="newDomainName">新建立程序域名称</param>
 /// <param name="newDomain">新建立程序域设置</param>
 public AssemblyLoader(string assemblyPath, string newDomainName, AppDomainSetup newDomain)
 {
     _domain  = AppDomain.CreateDomain(newDomainName, null, newDomain);
     _object  = (ProxyAssembly)_domain.CreateInstanceFromAndUnwrap(Assembly.GetExecutingAssembly().CodeBase, "Silmoon.Reflection.ProxyAssembly");
     _dllPath = assemblyPath;
 }