private static AppDomain CreateWorkerServiceDomain() { var currentDomainInfo = AppDomain.CurrentDomain.SetupInformation; var domainFriendlyName = typeof(InfinniPlatformServiceHostDomain).Name; // Создание домена приложения var domain = AppDomain.CreateDomain(domainFriendlyName, null, new AppDomainSetup { LoaderOptimization = LoaderOptimization.MultiDomainHost, ApplicationBase = currentDomainInfo.ApplicationBase, ConfigurationFile = currentDomainInfo.ConfigurationFile }); DomainAssemblyResolver.Setup(domain); // Установка рабочего каталога SetCurrentDirectory(domain, currentDomainInfo.ApplicationBase); // Установка обработчика службы SetWorkerServiceHost(domain); return(domain); }
static Processor() { locker = new object(); DomainAssemblyResolver.Connect(); }
static Processor() { DomainAssemblyResolver.Connect(); }
public void GetAssembly() { Assert.NotNull(DomainAssemblyResolver.GetAssembly(GetType().Assembly.GetName().FullName)); }