Ejemplo n.º 1
0
        public AppDomainHost(AppDomain appDomain)
        {
            string assemblyName = Assembly.GetAssembly(typeof(ServiceHostActivator)).FullName;

            m_ServiceHostActivator = appDomain.CreateInstanceAndUnwrap(assemblyName, typeof(ServiceHostActivator).ToString()) as ServiceHostActivator;
            m_ServiceHostActivator.SetType(typeof(T));
        }
Ejemplo n.º 2
0
        public AppDomainHost(string appDomainName)
        {
            Debug.Assert(AppDomain.CurrentDomain.FriendlyName != appDomainName);
            AppDomain newDomain    = AppDomain.CreateDomain(appDomainName);
            string    assemblyName = Assembly.GetAssembly(typeof(ServiceHostActivator)).FullName;

            m_ServiceHostActivator = newDomain.CreateInstanceAndUnwrap(assemblyName, typeof(ServiceHostActivator).ToString()) as ServiceHostActivator;
            m_ServiceHostActivator.SetType(typeof(T));
        }